Re: [patch] Fixes wanted-column bug in cursorbind feature

2012-03-28 Fir de Conversatie Bram Moolenaar

Gary Johnson wrote:

 There is a bug in Vim's tracking of the wanted cursor column in the
 cursorbind feature.  I believe that the attached patch fixes it.
 
 Vim keeps track of the desired or wanted cursor column as well as
 the actual cursor column.  When the user moves the cursor to a
 different line and the wanted cursor column value is not stale, Vim
 tries to move the cursor to that wanted column.  When 'cursorbind'
 is set, that wanted cursor column information is not being copied
 from the active window to the other cursorbound windows, resulting
 in the cursor jumping to seemingly random columns when moving the
 cursor up or down following a jump to a different window.
 
 To demonstrate this, start vim as vim -N -u NONE and execute the
 following.
 
 :set cursorbind
 a123456789Esc
 Yp
 :vnew
 PP
 
 Now move the cursor to column 5 and move the cursor to the other
 window:
 
 4l
 C-WC-W
 
 The cursor will be at column 5 of the other window, as expected.
 Now move the cursor to column 6 and move back to the original
 window.
 
 l
 C-WC-W
 
 The cursor will be at column 6, again as expected.  Now move the
 cursor down a line.
 
 j
 
 The cursor will move to row 2 but to column 5 instead of column 6.

Thanks for the patch.  I'll include it.

-- 
God made the integers; all else is the work of Man.
-- Kronecker

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php


Re: [patch] Fixes wanted-column bug in cursorbind feature

2012-03-26 Fir de Conversatie Gary Johnson
On 2012-03-26, Gary Johnson wrote:
 There is a bug in Vim's tracking of the wanted cursor column in the
 cursorbind feature.  I believe that the attached patch fixes it.

Patch is against version 7.3.475.

Regards,
Gary

-- 
You received this message from the vim_dev maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php