0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

updated for version 7.3.473

Problem:    'cursorbind' does not work correctly in combination with
            'virtualedit' set to "all".
Solution:   Copy coladd. (Gary Johnson)
This commit is contained in:
Bram Moolenaar
2012-03-16 19:24:26 +01:00
parent 5ad15df9ce
commit 1ea69b7077
2 changed files with 9 additions and 1 deletions

View File

@@ -2843,7 +2843,10 @@ halfpage(flag, Prenum)
do_check_cursorbind() do_check_cursorbind()
{ {
linenr_T line = curwin->w_cursor.lnum; linenr_T line = curwin->w_cursor.lnum;
colnr_T col = curwin->w_cursor.col; colnr_T col = curwin->w_cursor.col;
# ifdef FEAT_VIRTUALEDIT
colnr_T coladd = curwin->w_cursor.coladd;
# endif
win_T *old_curwin = curwin; win_T *old_curwin = curwin;
buf_T *old_curbuf = curbuf; buf_T *old_curbuf = curbuf;
int restart_edit_save; int restart_edit_save;
@@ -2875,6 +2878,9 @@ do_check_cursorbind()
# endif # endif
curwin->w_cursor.lnum = line; curwin->w_cursor.lnum = line;
curwin->w_cursor.col = col; curwin->w_cursor.col = col;
# ifdef FEAT_VIRTUALEDIT
curwin->w_cursor.coladd = coladd;
# endif
/* Make sure the cursor is in a valid position. Temporarily set /* Make sure the cursor is in a valid position. Temporarily set
* "restart_edit" to allow the cursor to be beyond the EOL. */ * "restart_edit" to allow the cursor to be beyond the EOL. */

View File

@@ -714,6 +714,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
473,
/**/ /**/
472, 472,
/**/ /**/