aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Prager <splinterofchaos@gmail.com>2014-10-16 15:55:54 -0400
committerScott Prager <splinterofchaos@gmail.com>2014-10-16 15:55:54 -0400
commitf2e5851dd9bd269b32972ee93d74acd898f75182 (patch)
tree25f204b9a81861eda3e818f8a374fec90e70035a
parent0a2d9fa8c88b6e263b9baa9b639c23321272f9bf (diff)
downloadrneovim-f2e5851dd9bd269b32972ee93d74acd898f75182.tar.gz
rneovim-f2e5851dd9bd269b32972ee93d74acd898f75182.tar.bz2
rneovim-f2e5851dd9bd269b32972ee93d74acd898f75182.zip
vim-patch:7.4.418
Problem: When leaving ":append" the cursor shape is like in Insert mode. (Jacob Niehus) Solution: Do not have State set to INSERT when calling getline(). https://code.google.com/p/vim/source/detail?r=v7-4-418
-rw-r--r--src/nvim/ex_cmds.c8
-rw-r--r--src/nvim/version.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 78c8b61c37..5db950f120 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -3183,10 +3183,16 @@ void ex_append(exarg_T *eap)
if (*p != NUL)
++p;
eap->nextcmd = p;
- } else
+ } else {
+ // Set State to avoid the cursor shape to be set to INSERT mode
+ // when getline() returns.
+ int save_State = State;
+ State = CMDLINE;
theline = eap->getline(
eap->cstack->cs_looplevel > 0 ? -1 :
NUL, eap->cookie, indent);
+ State = save_State;
+ }
lines_left = Rows - 1;
if (theline == NULL)
break;
diff --git a/src/nvim/version.c b/src/nvim/version.c
index ca5506c567..e26da2c607 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -214,7 +214,7 @@ static int included_patches[] = {
//421,
//420 NA
//419,
- //418,
+ 418,
//417,
//416,
//415,