Skip to content

Commit 2412e02

Browse files
committed
Try to fix block continuations
It seems like there was a bug if the parent of the block-opener happened to be part of another continuation. Continuing to look for a continuation opener should fix the issue, but only time will tell what else will break.
1 parent f9d6352 commit 2412e02

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

indent/ruby.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,15 @@ function s:GetMSL(lnum)
222222
elseif s:Match(lnum, s:non_bracket_continuation_regex) &&
223223
\ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex))
224224
" If the current line is a bracket continuation or a block-starter, but
225-
" the previous is a non-bracket one, respect the previous' indentation,
226-
" and stop here.
225+
" the previous is a non-bracket one, keep going to see if the previous
226+
" line is a part of another continuation.
227227
"
228228
" Example:
229229
" method_call one,
230230
" two {
231231
" three
232232
"
233-
return lnum
233+
let msl = lnum
234234
elseif s:Match(lnum, s:bracket_continuation_regex) &&
235235
\ (s:Match(msl, s:bracket_continuation_regex) || s:Match(msl, s:block_continuation_regex))
236236
" If both lines are bracket continuations (the current may also be a

0 commit comments

Comments
 (0)