Skip to content
Browse files

Do not accept a match at the cursor position.

Removing the 'c' flag from the searchpair() invokation seems to produce
a more predictable result.

Previously, the behaviour of 'vie' would be different if your cursor was
positioned on the 'd' or the 'o' of 'do'. Now, it is consistent.
  • Loading branch information...
1 parent 661cdd2 commit b8871503ae34db72e2300d62e4a91c6fd4bdc34a @nelstrom committed Nov 21, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 plugin/textobj/rubyblock.vim
View
4 plugin/textobj/rubyblock.vim
@@ -18,7 +18,7 @@ let s:start_pattern = s:comment_escape . s:block_openers
let s:end_pattern = s:comment_escape . '\zs<end>'
function! s:select_a()
- call searchpair(s:start_pattern,'',s:end_pattern, 'cW')
+ call searchpair(s:start_pattern,'',s:end_pattern, 'W')
let end_pos = getpos('.')
normal %
@@ -28,7 +28,7 @@ function! s:select_a()
endfunction
function! s:select_i()
- call searchpair(s:start_pattern,'',s:end_pattern, 'cW')
+ call searchpair(s:start_pattern,'',s:end_pattern, 'W')
let end_pos = getpos('.')
let end_pos[1] = end_pos[1] - 1

0 comments on commit b887150

Please sign in to comment.
Something went wrong with that request. Please try again.