multi-line method definition parameters #130

Closed
graywh opened this Issue Feb 15, 2013 · 3 comments

2 participants

@graywh

Just noticed that multi-line method parameters screw up the indentation of the method body.

module Foo
  def bar(
    baz
  )
  return baz+1
  end
end

There's no problem with multi-line method calls or other uses of parentheses for grouping AFAIK.

@AndrewRadev
Vim-Ruby member

I've pushed a commit to master that should fix this. Could you try it out?

The reason for the breakage was that a closing bracket on its own would just take the indent of the matching opening one. Checking if the line is an indent-starter should be enough to avoid this issue.

@AndrewRadev
Vim-Ruby member

From what I see, the issue seems to be fixed with said commit, so I'll close the issue. Feel free to reopen if that's not the case.

@graywh

Yeah, looks good now. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment