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

3783 writing end autocomplete with another #4424

Merged
merged 3 commits into from
Oct 3, 2024

Conversation

James-Yu
Copy link
Owner

@James-Yu James-Yu commented Oct 3, 2024

This PR closes #3783 .

After a careful check (and partially thanks to the new unit test system), I finally figured out the root cause to #3783 :

Originally, we consider all env suggestions to have the begin-end snippet, unless within the brace {}. This makes \end{ without the ending } to be considered the same as \begin{, and a full snippet is inserted.

This PR changed the behavior by making the suggestions default to AsName, and insert full snippet of begin-end only when there is one active selection, the nearest macro is \begin (instead of \end), and selection is not in {}.

Corresponding unit tests are added.

Note that this PR does not, and cannot, avoid vscode un-indenting \end. Anyways it's not a big issue.

@James-Yu James-Yu linked an issue Oct 3, 2024 that may be closed by this pull request
4 tasks
@James-Yu James-Yu merged commit 374e6fd into master Oct 3, 2024
9 of 10 checks passed
@James-Yu James-Yu deleted the 3783-writing-end-autocomplete-with-another branch October 3, 2024 07:06
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Writing \end would autocomplete with another \end
1 participant