diff options
author | Bram Moolenaar <Bram@vim.org> | 2011-02-01 18:01:11 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2011-02-01 18:01:11 +0100 |
commit | 6145285c905ae9a65cf83473ad490e1b077a8c6f (patch) | |
tree | 192e1b3c2c7c382db3e374510c7056b3fcb16c6a /src/move.c | |
parent | acf1728ef5ca881daaefd0819e66bd59efb35762 (diff) | |
download | vim-git-6145285c905ae9a65cf83473ad490e1b077a8c6f.tar.gz |
updated for version 7.3.111v7.3.111
Problem: Executing a :normal command in 'statusline' evaluation causes the
cursor to move. (Dominique Pelle)
Solution: When updating the cursor for 'cursorbind' allow the cursor beyond
the end of the line. When evaluating 'statusline' temporarily
reset 'cursorbind'.
Diffstat (limited to 'src/move.c')
-rw-r--r-- | src/move.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/move.c b/src/move.c index 447445b46..79df9285a 100644 --- a/src/move.c +++ b/src/move.c @@ -2846,6 +2846,7 @@ do_check_cursorbind() colnr_T col = curwin->w_cursor.col; win_T *old_curwin = curwin; buf_T *old_curbuf = curbuf; + int restart_edit_save; # ifdef FEAT_VISUAL int old_VIsual_select = VIsual_select; int old_VIsual_active = VIsual_active; @@ -2875,8 +2876,12 @@ do_check_cursorbind() curwin->w_cursor.lnum = line; curwin->w_cursor.col = col; - /* Make sure the cursor is in a valid position. */ + /* Make sure the cursor is in a valid position. Temporarily set + * "restart_edit" to allow the cursor to be beyond the EOL. */ + restart_edit_save = restart_edit; + restart_edit = TRUE; check_cursor(); + restart_edit = restart_edit_save; # ifdef FEAT_MBYTE /* Correct cursor for multi-byte character. */ if (has_mbyte) |