Skip to content

Commit 0c4f91d

Browse files
committed
Fix projected keyword highlighting
1 parent 68fedd7 commit 0c4f91d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

after/syntax/ruby/rails.vim

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,10 @@ function! s:highlight(group, ...) abort
259259
let words = split(join(filter(value, 'type(v:val) == type("")'), ' '))
260260
call filter(words, 'type(v:val) == type("") && v:val =~# ''^\h\k*[!?]\=[][{}]\=$''')
261261
if !empty(words)
262-
exe 'syn match' a:group substitute(
263-
\ '"\<\%('.join(words, '\|').'\)[[:keyword:]!?:]\@!"',
264-
\ '[][{}]', '\=get(s:special, submatch(0), submatch(0))', 'g')
262+
exe 'syn match' a:group '"\<\%(' . substitute(
263+
\ join(words, '\|'),
264+
\ '[][{}]', '\=get(s:special, submatch(0), submatch(0))', 'g') .
265+
\ '\)[[:keyword:]!?:]\@!"'
265266
endif
266267
endfunction
267268

0 commit comments

Comments
 (0)