diff --git a/indent/javascript.vim b/indent/javascript.vim index d9463d66..78ca8788 100644 --- a/indent/javascript.vim +++ b/indent/javascript.vim @@ -204,7 +204,8 @@ function s:ExprCol() return 1 endif let bal = 0 - while s:SearchLoop('[{}?:]','bW',s:skip_expr) + let lines = line('.') + while s:SearchLoop('[{}?:]','bW',s:skip_expr) && bal >= -lines if s:LookingAt() == ':' let bal -= !search('\m:\%#','bW') elseif s:LookingAt() == '?'