Skip to content

Commit aadf36b

Browse files
authored
cache can be invalid for he current line
1 parent cef306f commit aadf36b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

indent/javascript.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function GetJavascriptIndent()
160160
" the containing paren, bracket, curly. Memoize, last lineNr either has the
161161
" same scope or starts a new one, unless if it closed a scope.
162162
call cursor(v:lnum,1)
163-
if b:js_cache[0] >= l:lnum && b:js_cache[0] <= v:lnum && b:js_cache[0] &&
163+
if b:js_cache[0] >= l:lnum && b:js_cache[0] < v:lnum && b:js_cache[0] &&
164164
\ (b:js_cache[0] > l:lnum || s:Balanced(l:lnum) > 0)
165165
let num = b:js_cache[1]
166166
elseif syns != '' && l:line[0] =~ '\s'

0 commit comments

Comments
 (0)