Skip to content

[VIM] Fix syntax highlighting of nested comments #69461

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

Merged
merged 1 commit into from
Oct 31, 2023
Merged

[VIM] Fix syntax highlighting of nested comments #69461

merged 1 commit into from
Oct 31, 2023

Conversation

capricorn
Copy link
Contributor

This fixes incorrect vim syntax highlighting of some comments. The following examples incorrectly highlight foo as a comment.

/* // */ foo
// /*
foo
*/ foo

This was previously fixed in fea0f4d but was a regression introduced in 633986e.

The simplest test is to place the two syntax files of swift.vim, before and after this change, into ~/.vim/syntax with unique names, open the above comments in vim and then toggle between them with eg :set syntax=swiftfix.vim.

This example incorrectly highlights 'foo' as a comment:
/* // */ foo

This example does as well:
// /*
foo
*/ foo
@compnerd
Copy link
Member

@swift-ci please smoke test

@compnerd
Copy link
Member

Thanks for the contribution @capricorn!

@compnerd compnerd merged commit 6589897 into swiftlang:main Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants