diff options
author | Bram Moolenaar <bram@vim.org> | 2012-03-16 19:24:26 +0100 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2012-03-16 19:24:26 +0100 |
commit | 3a4154e52061e04042fc3d2cf51aa5ce917c165b (patch) | |
tree | 0872c32e033451330c0e6c48bfa88346f9b8be56 | |
parent | 817a0cbc9ef3797e65de404768872bdea3bffdbd (diff) | |
download | vim-3a4154e52061e04042fc3d2cf51aa5ce917c165b.tar.gz |
Problem: 'cursorbind' does not work correctly in combination with
'virtualedit' set to "all".
Solution: Copy coladd. (Gary Johnson)
-rw-r--r-- | src/move.c | 8 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 9 insertions, 1 deletions
@@ -2843,7 +2843,10 @@ halfpage(flag, Prenum) do_check_cursorbind() { 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; buf_T *old_curbuf = curbuf; int restart_edit_save; @@ -2875,6 +2878,9 @@ do_check_cursorbind() # endif curwin->w_cursor.lnum = line; 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 * "restart_edit" to allow the cursor to be beyond the EOL. */ diff --git a/src/version.c b/src/version.c index f52d9fa4..3f36bbd8 100644 --- a/src/version.c +++ b/src/version.c @@ -715,6 +715,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 473, +/**/ 472, /**/ 471, |