Permalink
Browse files

Fix bug with 'ignorecase' on

The pattern for the start of an "end" was being matched by a "Class"
constant.
  • Loading branch information...
1 parent 3e56518 commit 4cf6a00a1e9cc0c5404fc2c11447716b5abc1ce7 @AndrewRadev AndrewRadev committed May 10, 2012
Showing with 6 additions and 1 deletion.
  1. +5 −0 etc/examples/indent/blocks.rb
  2. +1 −1 indent/ruby.vim
@@ -28,3 +28,8 @@ def foo
puts h
end
end
+
+module X
+ Class.new do
+ end
+end
View
@@ -64,7 +64,7 @@ let s:ruby_deindent_keywords =
"let s:end_start_regex = '\%(^\|[^.]\)\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\|do\)\>'
" TODO: the do here should be restricted somewhat (only at end of line)?
let s:end_start_regex =
- \ '\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' .
+ \ '\C\%(^\s*\|[=,*/%+\-|;{]\|<<\|>>\|:\s\)\s*\zs' .
\ '\<\%(module\|class\|def\|if\|for\|while\|until\|case\|unless\|begin\):\@!\>' .
\ '\|\<do:\@!\>'

0 comments on commit 4cf6a00

Please sign in to comment.