From 881474edcb223ac22a08d81a824809c33ca3a9c9 Mon Sep 17 00:00:00 2001
From: Peter Stephenson
Date: Fri, 21 Aug 2015 21:33:37 +0100
Subject: unposted: fix up for 5.0.8-test-2
---
Src/Zle/zle_misc.c | 2 +-
Src/parse.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
(limited to 'Src')
diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c
index d25e4ebef..2d1862813 100644
--- a/Src/Zle/zle_misc.c
+++ b/Src/Zle/zle_misc.c
@@ -738,7 +738,7 @@ yankpop(UNUSED(char **args))
}
/**/
-char *
+mod_export char *
bracketedstring(void)
{
static const char endesc[] = "\033[201~";
diff --git a/Src/parse.c b/Src/parse.c
index 09317610b..7c2d20250 100644
--- a/Src/parse.c
+++ b/Src/parse.c
@@ -66,7 +66,7 @@ int infor;
/* != 0 if parsing arguments of typeset etc. */
/**/
-int intypeset;
+mod_export int intypeset;
/* list of here-documents */
--
cgit 1.4.1
From 8abe1496fb3577c11eb98bd57fa6162763e1b7f5 Mon Sep 17 00:00:00 2001
From: "Barton E. Schaefer"
Date: Fri, 21 Aug 2015 10:55:43 -0700
Subject: 36256: local options should remain in effect for "emulate -L" even if
additional option settings are applied
---
ChangeLog | 5 +++++
Src/builtin.c | 11 +++++++----
2 files changed, 12 insertions(+), 4 deletions(-)
(limited to 'Src')
diff --git a/ChangeLog b/ChangeLog
index 3db846c4b..33d8ac4c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,11 @@
* unposted: Config/version.mk, Src/parse.c, Src/Zle/zle_misc.c:
update to 5.0.8-test-2 and fix some exports.
+2015-08-21 Barton E. Schaefer
+
+ * 36256: Src/builtin.c: local options should remain in effect
+ for "emulate -L" even if additional option settings are applied
+
2015-08-21 Peter Stephenson
* 36264: Src/glob.c: pathbuf is apparently metafied; document
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));
--
cgit 1.4.1
From 1cfe4ca1926bc2c8041290bb0d8c3dccf8662f52 Mon Sep 17 00:00:00 2001
From: "Barton E. Schaefer"
Date: Sat, 22 Aug 2015 21:50:31 -0700
Subject: 36273: teach endofline() and endoflinehist() about invicmdmode()
cursor placement.
---
ChangeLog | 5 +++++
Src/Zle/zle_move.c | 4 ++++
2 files changed, 9 insertions(+)
(limited to 'Src')
diff --git a/ChangeLog b/ChangeLog
index 5f9ccf8e3..1cc9ff1ec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-22 Barton E. Schaefer
+
+ * 36273: Src/Zle/zle_move.c: teach endofline() and endoflinehist()
+ about invicmdmode() cursor placement.
+
2015-08-21 Peter Stephenson
* unposted: Config/version.mk, Src/parse.c, Src/Zle/zle_misc.c:
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;
--
cgit 1.4.1
From 43079e5d8ec4e3016c380a6043c90f94fe45d72a Mon Sep 17 00:00:00 2001
From: "Barton E. Schaefer"
Date: Sat, 22 Aug 2015 21:54:31 -0700
Subject: 36274: clear virangeflag when getvirange() has an error (the next
keystroke is not a motion/selection).
---
ChangeLog | 3 +++
Src/Zle/zle_vi.c | 2 ++
2 files changed, 5 insertions(+)
(limited to 'Src')
diff --git a/ChangeLog b/ChangeLog
index 1cc9ff1ec..746caece8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2015-08-22 Barton E. Schaefer
+ * 36274: Src/Zle/zle_vi.c: clear virangeflag when getvirange()
+ has an error (the next keystroke is not a motion/selection).
+
* 36273: Src/Zle/zle_move.c: teach endofline() and endoflinehist()
about invicmdmode() cursor placement.
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;
--
cgit 1.4.1
From 2e69ece5cfab850b8ba00b272f35ccdaf727c781 Mon Sep 17 00:00:00 2001
From: Jun-ichi Takimoto
Date: Sun, 23 Aug 2015 14:31:56 +0900
Subject: users/20455: do not use posix_openpt() on OpenBSD
---
ChangeLog | 5 +++++
Src/Modules/zpty.c | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
(limited to 'Src')
diff --git a/ChangeLog b/ChangeLog
index 746caece8..c9d8e6332 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-23 Jun-ichi Takimoto
+
+ * users/20455: Src/Modules/zpty.c: do not use posix_openpt()
+ on OpenBSD
+
2015-08-22 Barton E. Schaefer
* 36274: Src/Zle/zle_vi.c: clear virangeflag when getvirange()
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
--
cgit 1.4.1