We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85eeb98 commit 9dda622Copy full SHA for 9dda622
1 file changed
indent/javascript.vim
@@ -65,6 +65,7 @@ let s:comma_first = '^\s*,'
65
let s:comma_last = ',\s*$'
66
67
let s:ternary = '^\s\+[?|:]'
68
+let s:ternary_q = '^\s\+?'
69
70
" 2. Auxiliary Functions {{{1
71
" ======================
@@ -342,7 +343,7 @@ function GetJavascriptIndent()
342
343
endif
344
345
if (line =~ s:ternary)
- if (getline(prevline) =~ s:ternary)
346
+ if (getline(prevline) =~ s:ternary_q)
347
return indent(prevline)
348
else
349
return indent(prevline) + &sw
0 commit comments