summaryrefslogtreecommitdiff
path: root/Src
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2015-08-27 17:40:41 +0200
committerAxel Beckert <abe@deuxchevaux.org>2015-08-27 17:40:41 +0200
commit6f1dd991eb95cc2049a667960fc3eedb78845646 (patch)
tree4ab413ba9978c243019e14bab92fdf5a9a5bb4b9 /Src
parent5c3b312cdeac0ae3f3f6b71f3dbc69bf18000d88 (diff)
parent2663a0310f03e62a4439602158b956ec08e3f4fd (diff)
downloadzsh-6f1dd991eb95cc2049a667960fc3eedb78845646.tar.gz
zsh-6f1dd991eb95cc2049a667960fc3eedb78845646.zip
Merge tag 'zsh-5.0.8-test-3' into debian
Diffstat (limited to 'Src')
-rw-r--r--Src/Modules/zpty.c3
-rw-r--r--Src/Zle/zle_move.c4
-rw-r--r--Src/Zle/zle_vi.c2
-rw-r--r--Src/builtin.c11
4 files changed, 15 insertions, 5 deletions
diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c
index 12e42b5bd..9741ee287 100644
--- a/Src/Modules/zpty.c
+++ b/Src/Modules/zpty.c
@@ -154,7 +154,8 @@ getptycmd(char *name)
return NULL;
}
-#ifdef USE_DEV_PTMX
+/* posix_openpt() seems to have some problem on OpenBSD */
+#if defined(USE_DEV_PTMX) && !defined(__OpenBSD__)
#ifdef HAVE_SYS_STROPTS_H
#include <sys/stropts.h>
diff --git a/Src/Zle/zle_move.c b/Src/Zle/zle_move.c
index f49df8647..155fda80d 100644
--- a/Src/Zle/zle_move.c
+++ b/Src/Zle/zle_move.c
@@ -344,6 +344,8 @@ endofline(char **args)
zlecs = zlell;
return 0;
}
+ if ((zlecs += invicmdmode()) == zlell)
+ break;
if (zleline[zlecs] == '\n')
if (++zlecs == zlell)
return 0;
@@ -414,6 +416,8 @@ endoflinehist(char **args)
zlecs = zlell;
break;
}
+ if ((zlecs += invicmdmode()) == zlell)
+ break;
if (zleline[zlecs] == '\n')
if (++zlecs == zlell)
break;
diff --git a/Src/Zle/zle_vi.c b/Src/Zle/zle_vi.c
index 1a11ca7d5..42dc46e7e 100644
--- a/Src/Zle/zle_vi.c
+++ b/Src/Zle/zle_vi.c
@@ -224,6 +224,7 @@ getvirange(int wf)
ZS_memcpy(zleline, lastline, zlell = lastll);
zlecs = pos;
mark = mpos;
+ virangeflag = 0;
return -1;
}
@@ -232,6 +233,7 @@ getvirange(int wf)
if (!zlell || (zlecs == pos && (mark == -1 || mark == zlecs) &&
virangeflag != 2) || ret == -1) {
mark = mpos;
+ virangeflag = 0;
return -1;
}
virangeflag = 0;
diff --git a/Src/builtin.c b/Src/builtin.c
index 3d34aa74c..97022addf 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -5465,8 +5465,8 @@ bin_emulate(UNUSED(char *nam), char **argv, Options ops, UNUSED(int func))
/* with single argument set current emulation */
if (!argv[1]) {
- emulate(shname, OPT_ISSET(ops,'R'), &emulation, opts);
- if (OPT_ISSET(ops,'L'))
+ emulate(shname, opt_R, &emulation, opts);
+ if (opt_L)
opts[LOCALOPTIONS] = opts[LOCALTRAPS] = opts[LOCALPATTERNS] = 1;
clearpatterndisables();
return 0;
@@ -5476,7 +5476,7 @@ bin_emulate(UNUSED(char *nam), char **argv, Options ops, UNUSED(int func))
memcpy(saveopts, opts, sizeof(opts));
memcpy(new_opts, opts, sizeof(opts));
savehackchar = keyboardhackchar;
- emulate(shname, OPT_ISSET(ops,'R'), &new_emulation, new_opts);
+ emulate(shname, opt_R, &new_emulation, new_opts);
optlist = newlinklist();
if (parseopts("emulate", &argv, new_opts, &cmd, optlist)) {
ret = 1;
@@ -5508,8 +5508,11 @@ bin_emulate(UNUSED(char *nam), char **argv, Options ops, UNUSED(int func))
goto restore2;
}
*--argv = cmd; /* on stack, never free()d, see execbuiltin() */
- } else
+ } else {
+ if (opt_L)
+ opts[LOCALOPTIONS] = opts[LOCALTRAPS] = opts[LOCALPATTERNS] = 1;
return 0;
+ }
save_sticky = sticky;
sticky = hcalloc(sizeof(*sticky));