diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-09-07 19:28:15 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-07 19:28:15 -0700 |
commit | 3dbd94dafa25b6bd5a425b3a5b0c57ee196bde27 (patch) | |
tree | 208fa917f8051bc4eab0c8f749be41e77ef09311 /src/nvim/ex_docmd.c | |
parent | dd7355358edc40734afcce695432756859377eb8 (diff) | |
parent | 15459f92551c9f20a0bd5625e8bd9a4259a6c16c (diff) | |
download | rneovim-3dbd94dafa25b6bd5a425b3a5b0c57ee196bde27.tar.gz rneovim-3dbd94dafa25b6bd5a425b3a5b0c57ee196bde27.tar.bz2 rneovim-3dbd94dafa25b6bd5a425b3a5b0c57ee196bde27.zip |
Merge #10963 from janlazo/vim-8.1.1988
vim-patch:8.0.1550,8.1.{1716,1988}
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index b97c886094..d524c3d035 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -8305,15 +8305,14 @@ static void ex_startinsert(exarg_T *eap) if (!curwin->w_cursor.lnum) { curwin->w_cursor.lnum = 1; } - coladvance((colnr_T)MAXCOL); - curwin->w_curswant = MAXCOL; - curwin->w_set_curswant = FALSE; + set_cursor_for_append_to_line(); } - /* Ignore the command when already in Insert mode. Inserting an - * expression register that invokes a function can do this. */ - if (State & INSERT) + // Ignore the command when already in Insert mode. Inserting an + // expression register that invokes a function can do this. + if (State & INSERT) { return; + } if (eap->cmdidx == CMD_startinsert) restart_edit = 'a'; @@ -8325,7 +8324,7 @@ static void ex_startinsert(exarg_T *eap) if (!eap->forceit) { if (eap->cmdidx == CMD_startinsert) restart_edit = 'i'; - curwin->w_curswant = 0; /* avoid MAXCOL */ + curwin->w_curswant = 0; // avoid MAXCOL } if (VIsual_active) { |