We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5bc55be commit 1a63017Copy full SHA for 1a63017
indent/ruby.vim
@@ -539,10 +539,17 @@ function GetRubyIndent(...)
539
call cursor(lnum, closing.pos + 1)
540
normal! %
541
542
- if s:Match(line('.'), s:ruby_indent_keywords)
543
- return indent('.') + &sw
+ let msl = line('.')
+ let tentative_msl = s:GetMSL(msl)
544
+ while msl != tentative_msl
545
+ let msl = tentative_msl
546
547
+ endwhile
548
+
549
+ if s:Match(msl, s:ruby_indent_keywords)
550
+ return indent(msl) + &sw
551
else
- return indent('.')
552
+ return indent(msl)
553
endif
554
555
call cursor(clnum, vcol)
0 commit comments