Skip to content

Commit ba6f71f

Browse files
bstriebrson
authored andcommitted
Properly highlight nested comments in vim
Prior to this commit, every block comment /* */ required two closing tags for every opening tag in order to terminate the highlighting. Setting and testing for a variable was the culprit, though I'm not certain why, but they appear to just be boilerplate lines from whatever pcwalton based this file upon. I've looked at other officially-distributed vim highlighting files and none seem to do the test that this commit removes, so I'm fairly certain it didn't provide anything vital. And now comment highlighting works!
1 parent e2c7016 commit ba6f71f

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/etc/vim/syntax/rust.vim

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,10 @@
33
" Maintainer: Patrick Walton <[email protected]>
44
" Last Change: 2010 Oct 13
55

6-
" Quit when a syntax file was already loaded
7-
if !exists("main_syntax")
8-
if version < 600
9-
syntax clear
10-
elseif exists("b:current_syntax")
11-
finish
12-
endif
13-
" we define it here so that included files can test for it
14-
let main_syntax='rust'
6+
if version < 600
7+
syntax clear
8+
elseif exists("b:current_syntax")
9+
finish
1510
endif
1611

1712
syn keyword rustAssert assert

0 commit comments

Comments
 (0)