Skip to content

Commit d6f9955

Browse files
author
Nikolai Weibull
committed
Fix indentation of brackets
a = [ … ] wasn’t being indented correctly.
1 parent 210702f commit d6f9955

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎indent/ruby.vim‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,8 @@ function GetRubyIndent()
301301
return virtcol('.')
302302
endif
303303
else
304-
return matchend(line, '\S', open.pos + 1) - 1
304+
let nonspace = matchend(line, '\S', open.pos + 1) - 1
305+
return nonspace > 0 ? nonspace : ind + &sw
305306
endif
306307
else
307308
call cursor(v:lnum, vcol)

0 commit comments

Comments
 (0)