Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix quote logic regarding code completion #42432

Closed

Conversation

gvekan
Copy link
Contributor

@gvekan gvekan commented Sep 30, 2020

Fixes #42382

The fix could not be tested in master because of other issues, it is however tested in the 3.2 branch, and the code that is fixed is the same in both branches.

The old code doesn't consider that you can write a single quote between double quotes or vice versa: " ' " or ' " '.

@gvekan gvekan force-pushed the fix-autocomplete-nested-quote branch from 09ab1ee to 4b8b8fa Compare September 30, 2020 14:58
@gvekan gvekan marked this pull request as ready for review September 30, 2020 15:09
@Calinou Calinou added bug cherrypick:3.x Considered for cherry-picking into a future 3.x release topic:gdscript labels Sep 30, 2020
@Calinou Calinou added this to the 4.0 milestone Sep 30, 2020
@akien-mga akien-mga requested a review from Paulb23 September 30, 2020 20:03
@gvekan
Copy link
Contributor Author

gvekan commented Nov 17, 2020

@Paulb23 While working with other issues I saw that the wrong logic of being in quote also exist here.

godot/scene/gui/text_edit.cpp

Lines 6307 to 6315 in 4b8b8fa

bool inquote = false;
int c = ofs - 1;
while (c >= 0) {
if (l[c] == '"' || l[c] == '\'') {
inquote = !inquote;
}
c--;
}

I haven't looked into what the function containing this code does, but it's probably a problem here too, because it's the same bug. Should I fix this in this PR also?

@YuriSizov YuriSizov requested a review from a team August 24, 2021 23:34
@Paulb23
Copy link
Member

Paulb23 commented Aug 30, 2021

Closing as this code has been completely re-written (#45393) so a completely different fix is needed for the linked issue.

@Paulb23 Paulb23 closed this Aug 30, 2021
@Paulb23 Paulb23 added archived and removed cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[3.x] Autocomplete stops working after nested quote
4 participants