Search code examples
vimword-wrapline-breakstext-cursor

Strange VIM behaviour with wrapped lines: When using word movements, visual and actual cursor position diverge


I did the following:

caw for change word. Then, esc for normal mode. Then, b a couple of times.

However, while I expected to jump to the beginning of the words sit, dolor, ipsum, the cursor did not move there. When I inserted text, however, it somehow actually was there.

To sum up, what I wanted to do worked, but the cursor position did not reflect that when pressing b. Also, the line wrapping looked strange.

What's wrong here?

I recently upgraded from Vim 7.3 to 7.4. The problem does not occur in the previous version!

movements Here's the part of my .vimrc I edited last (the rest has been there for about a year, so I skipped it):

set number
set tabstop=2 shiftwidth=2 noet
set clipboard+=unnamed
set linebreak
set nobackup
set nowritebackup
set shell=/bin/sh
set ic
set completeopt=menu,menuone
let g:ycm_auto_trigger=0
let g:tex_flavor="latex"
let g:ycm_key_invoke_completion = ""
inoremap <c-@> <c-x><c-u>

Solution

  • This is a bug, that has been fixed with patch 7.4.579. There have been other similar patches afterwards added, because of some similar problems.