aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2014-09-22 22:06:39 -0400
committerJustin M. Keyes <justinkz@gmail.com>2014-09-22 22:06:39 -0400
commit21f1802b8af60878c5c83032732cb1b4e1ef7f34 (patch)
tree0ad9ea80cb23bbe68a76ce869654c67376dda719 /src/nvim/edit.c
parent3b0437916424cde16ce4c4dd13faa70b68a84a7d (diff)
parentea492696cfbb5912b9b42112159a028e24f9e2fc (diff)
downloadrneovim-21f1802b8af60878c5c83032732cb1b4e1ef7f34.tar.gz
rneovim-21f1802b8af60878c5c83032732cb1b4e1ef7f34.tar.bz2
rneovim-21f1802b8af60878c5c83032732cb1b4e1ef7f34.zip
Merge pull request #1207 from atwupack/vp-7.4.407
vim-patch:7.4.407
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 3b450e5245..5131dc3b38 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -5610,12 +5610,18 @@ static void spell_back_to_badword(void)
int stop_arrow(void)
{
if (arrow_used) {
+ Insstart = curwin->w_cursor; //new insertion starts here
+ if (Insstart.col > Insstart_orig.col && !ins_need_undo) {
+ // Don't update the original insert position when moved to the
+ // right, except when nothing was inserted yet.
+ update_Insstart_orig = FALSE;
+ }
+ Insstart_textlen = (colnr_T)linetabsize(get_cursor_line_ptr());
+
if (u_save_cursor() == OK) {
arrow_used = FALSE;
ins_need_undo = FALSE;
}
- Insstart = curwin->w_cursor; /* new insertion starts here */
- Insstart_textlen = (colnr_T)linetabsize(get_cursor_line_ptr());
ai_col = 0;
if (State & VREPLACE_FLAG) {
orig_line_count = curbuf->b_ml.ml_line_count;