File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -383,6 +383,8 @@ if exists('g:NERDTreeLimitedSyntax') && !exists('g:NERDTreeSyntaxDisableDefaultE
383
383
endif
384
384
385
385
let s: characters = ' [a-zA-Z0-9_\#\-\+\*\%\!\~\(\)\{\}\&\.\$\@]'
386
+ " substitute will 'eat' single backlashes on the string
387
+ let s: chars_double_lashes = substitute (s: characters , ' \\' , ' \\\\' , ' g' )
386
388
387
389
" Extension colors
388
390
@@ -485,9 +487,7 @@ for [key, val] in items(g:NERDTreePatternMatchHighlightColor)
485
487
let suffix = substitute (key , ' \W' , ' ' , ' g' )
486
488
let label_identifier = ' nerdtreePatternMatchLabel_' .suffix
487
489
let icon_identifier = ' nerdtreePatternMatchIcon_' .suffix
488
- " substitute will 'eat' single backlashes on the string
489
- let chars_double_lashes = substitute (s: characters , ' \\' , ' \\\\' , ' g' )
490
- let sub_regexp = substitute (key , ' \v\\@<!\.' , chars_double_lashes, ' g' )
490
+ let sub_regexp = substitute (key , ' \v\\@<!\.' , s: chars_double_lashes , ' g' )
491
491
let exec_sub_regexp = substitute (sub_regexp, ' \$$' , ' \\*$' , ' ' )
492
492
493
493
exec ' syn match ' .label_identifier.' "\v\c' .sub_regexp.' " containedin=NERDTreeFile'
You can’t perform that action at this time.
0 commit comments