Skip to content

Commit

Permalink
Remove curwin->w_curswant hack
Browse files Browse the repository at this point in the history
Looks like this was a temporary bug in the version of Vim I was running
at the time.
  • Loading branch information
guns committed Jul 15, 2013
1 parent 3f9d3c5 commit aa862ff
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions plugin/sexp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,9 @@ function! s:defplug(flags, mapmode, name, ...)
\ . 'call ' . rhs . '<CR>'
" Expression, repeating, operator-pending mode
elseif opmode
" Due to a bug in vim, we need to set curwin->w_curswant to the
" current cursor position by entering and exiting character-wise
" visual mode before completing the operator-pending command so that
" the cursor returns to its original position after an = command.
execute lhs . ' '
\ . ':<C-u>let b:sexp_count = v:count \| '
\ . 'execute "normal! vv' . (nojump ? '' : 'm`') . '" \| '
\ . (nojump ? '' : 'execute "normal! m`" \| ')
\ . 'call ' . substitute(rhs, '\v<v:count>', 'b:sexp_count', 'g') . ' \| '
\ . 'if v:operator ==? "c" \| '
\ . ' call <SID>repeat_set(v:operator . "\<Plug>' . a:name . '\<lt>C-r>.\<lt>C-Bslash>\<lt>C-n>", b:sexp_count) \| '
Expand Down

0 comments on commit aa862ff

Please sign in to comment.