Mercurial > vim
changeset 3433:3229335d0c4e v7.3.482
updated for version 7.3.482
Problem: With 'cursorbind' set moving up/down does not always keep the same
column.
Solution: Set curswant appropriately. (Gary Johnson)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 28 Mar 2012 14:19:50 +0200 |
parents | d579aeb3ac8d |
children | 39a0757e0086 |
files | src/move.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/move.c +++ b/src/move.c @@ -2847,6 +2847,8 @@ do_check_cursorbind() # ifdef FEAT_VIRTUALEDIT colnr_T coladd = curwin->w_cursor.coladd; # endif + colnr_T curswant = curwin->w_curswant; + int set_curswant = curwin->w_set_curswant; win_T *old_curwin = curwin; buf_T *old_curbuf = curbuf; int restart_edit_save; @@ -2881,6 +2883,8 @@ do_check_cursorbind() # ifdef FEAT_VIRTUALEDIT curwin->w_cursor.coladd = coladd; # endif + curwin->w_curswant = curswant; + curwin->w_set_curswant = set_curswant; /* Make sure the cursor is in a valid position. Temporarily set * "restart_edit" to allow the cursor to be beyond the EOL. */