diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2015-05-05 23:32:59 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2015-05-05 23:58:59 +0200 |
commit | db38e167634b6c2217eec3a5aafc37c46d9e5a8d (patch) | |
tree | daa342d423febbd3a5a7ef97053037677fab004a /Src/Zle/zle_hist.c | |
parent | 01eea47617a6e06debdb4330f92ae69f92089fd2 (diff) | |
parent | 3c3c8d3d13fd4cf6c03f81ca8dc18a1efd561728 (diff) | |
download | zsh-db38e167634b6c2217eec3a5aafc37c46d9e5a8d.tar.gz zsh-db38e167634b6c2217eec3a5aafc37c46d9e5a8d.zip |
Merge branch 'upstream' into debian
Diffstat (limited to 'Src/Zle/zle_hist.c')
-rw-r--r-- | Src/Zle/zle_hist.c | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c index 44b39d186..cc66f99ae 100644 --- a/Src/Zle/zle_hist.c +++ b/Src/Zle/zle_hist.c @@ -227,14 +227,14 @@ uphistory(UNUSED(char **args)) } /**/ -static int -upline(void) +int +upline(char **args) { int n = zmult; if (n < 0) { zmult = -zmult; - n = -downline(); + n = -downline(args); zmult = -zmult; return n; } @@ -270,7 +270,7 @@ int uplineorhistory(char **args) { int ocs = zlecs; - int n = upline(); + int n = upline(args); if (n) { int m = zmult, ret; @@ -300,7 +300,7 @@ int uplineorsearch(char **args) { int ocs = zlecs; - int n = upline(); + int n = upline(args); if (n) { int m = zmult, ret; @@ -316,14 +316,14 @@ uplineorsearch(char **args) } /**/ -static int -downline(void) +int +downline(char **args) { int n = zmult; if (n < 0) { zmult = -zmult; - n = -upline(); + n = -upline(args); zmult = -zmult; return n; } @@ -358,7 +358,7 @@ int downlineorhistory(char **args) { int ocs = zlecs; - int n = downline(); + int n = downline(args); if (n) { int m = zmult, ret; @@ -388,7 +388,7 @@ int downlineorsearch(char **args) { int ocs = zlecs; - int n = downline(); + int n = downline(args); if (n) { int m = zmult, ret; @@ -821,6 +821,8 @@ pushline(UNUSED(char **args)) zpushnode(bufstack, zlelineasstring(zleline, zlell, 0, NULL, NULL, 0)); while (--n) zpushnode(bufstack, ztrdup("")); + if (invicmdmode()) + INCCS(); stackcs = zlecs; *zleline = ZWC('\0'); zlell = zlecs = 0; @@ -851,8 +853,10 @@ pushlineoredit(char **args) free(zhline); } ret = pushline(args); - if (!isfirstln) - errflag = done = 1; + if (!isfirstln) { + errflag |= ERRFLAG_ERROR|ERRFLAG_INT; + done = 1; + } clearlist = 1; return ret; } |