about summary refs log tree commit diff
path: root/Src/Modules/parameter.c
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-12 08:24:15 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-04-12 08:24:15 +0000
commitb1d4a8194a12b74a5bae9951ae7d20e5af82f715 (patch)
treeacd52dd4b63fef0ba636648dcf95dfd642c331f8 /Src/Modules/parameter.c
parent07b3a775b16fb00ae1434ee0ac465990440e4bd3 (diff)
downloadzsh-b1d4a8194a12b74a5bae9951ae7d20e5af82f715.tar.gz
zsh-b1d4a8194a12b74a5bae9951ae7d20e5af82f715.tar.xz
zsh-b1d4a8194a12b74a5bae9951ae7d20e5af82f715.zip
new widget copy-prev-shell-word, like copy-prev-word but uses shell parsing to find word (10685)
Diffstat (limited to 'Src/Modules/parameter.c')
-rw-r--r--Src/Modules/parameter.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c
index 6bfe43479..bc8918e0f 100644
--- a/Src/Modules/parameter.c
+++ b/Src/Modules/parameter.c
@@ -1093,11 +1093,15 @@ static char **
 histwgetfn(Param pm)
 {
     char **ret, **p, *h, *e, sav;
-    LinkList l = newlinklist();
+    LinkList l = newlinklist(), ll;
     LinkNode n;
     int i = addhistnum(curhist, -1, HIST_FOREIGN), iw;
     Histent he = quietgethistent(i, GETHIST_UPWARD);
 
+    ll = bufferwords(NULL);
+    for (n = firstnode(ll); n; incnode(n))
+	pushnode(l, getdata(n));
+
     while (he) {
 	for (iw = he->nwords - 1; iw >= 0; iw--) {
 	    h = he->text + he->words[iw * 2];