Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] copy-prev-shell-word broken since 4.3.11



I used to be able to use copy-prev-shell-word to copy the word to the left of
my cursor. At some point this broke, always giving the last word on the line,
and I couldn't be bothered to look into it. Now I have looked at it. It works
in 4.3.10, not in 4.3.11.

I have never looked at the zsh source before, but hopefully this patch doesn't
break something else. The bufferwords function (and the whole lexer) seems
pretty, uh, frightening.

--- Src/Zle/zle_misc.c.orig     2013-12-29 03:49:50.485020686 +0100
+++ Src/Zle/zle_misc.c  2013-12-29 03:35:06.661038824 +0100
@@ -843,7 +843,7 @@
     if (zmult <= 0)
 	return 1;
 
-    if ((l = bufferwords(NULL, NULL, &i, 0))) {
+    if ((l = bufferwords(NULL, NULL, &i, LEXFLAGS_ZLE))) {
 	i -= (zmult-1);
 	if (i < 0)
 	    return 1;



Messages sorted by: Reverse Date, Date, Thread, Author