Skip to content

Commit 7e9aeb3

Browse files
authored
word boundary to start/end
1 parent 822dfe5 commit 7e9aeb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

indent/javascript.vim

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function s:IsBlock()
140140
let char = getline(line('.'))[col('.')-1]
141141
if char =~# '\l'
142142
return expand('<cword>') !~#
143-
\ '\<\%(var\|const\|let\|\%(im\|ex\)port\|yield\|de\%(fault\|lete\)\|void\|t\%(ypeof\|hrow\)\|new\|in\%(stanceof\)\=\)\>'
143+
\ '^\%(var\|const\|let\|\%(im\|ex\)port\|yield\|de\%(fault\|lete\)\|void\|t\%(ypeof\|hrow\)\|new\|in\%(stanceof\)\=\)$'
144144
elseif char == '>'
145145
return search('=\%#','bW') || synIDattr(synID(line('.'),col('.'),0),'name') =~? 'flownoise'
146146
elseif char == ':'

0 commit comments

Comments
 (0)