Skip to content

Commit

Permalink
Remove unnecessary check
Browse files Browse the repository at this point in the history
This fixes a regression with case statements from commit
0c4190c.

Turns out, `s:Match` already handles the string-or-comment check, and in
a much smarter way, so the abovementioned commit only needed to update
the syntax groups checked for being a "string".
  • Loading branch information
AndrewRadev committed Feb 10, 2013
1 parent 5f65739 commit 96b308b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions indent/ruby.vim
Original file line number Diff line number Diff line change
Expand Up @@ -498,9 +498,7 @@ function GetRubyIndent(...)

" If the previous line ended with [*+/.,-=], but wasn't a block ending,
" indent one extra level.
if s:Match(lnum, s:non_bracket_continuation_regex)
\ && !s:Match(lnum, '^\s*\(}\|end\)')
\ && !s:IsInStringOrComment(lnum, len(line))
if s:Match(lnum, s:non_bracket_continuation_regex) && !s:Match(lnum, '^\s*\(}\|end\)')
if lnum == p_lnum
let ind = msl_ind + &sw
else
Expand Down

0 comments on commit 96b308b

Please sign in to comment.