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

Re: yank-pop broken in current dev zsh?



On 11 Jan, Bart wrote:
> with "thre" highlighted and the cursor on the final "e".  The cursor should
> be after the entire word "three", should it not?  The whole "three" is then

> I suppose this might be related to the CURSOR increment I mentioned needing
> following select-in-shell-word in a widget.

That's more-or-less exactly what the issue is. There was a cursor
correction in there that should only be there for vi command-mode. Does
things seem right in emacs mode with the following fix?

In many cases we compare zlecs to findbol() for the correction but I
don't think that would be correct in this case.

diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c
index 25f65b3..a040ca0 100644
--- a/Src/Zle/zle_misc.c
+++ b/Src/Zle/zle_misc.c
@@ -597,7 +597,7 @@ static void pastebuf(Cutbuffer buf, int mult, int position)
 	    zlecs += cc;
 	}
 	yanke = zlecs;
-	if (zlecs)
+	if (zlecs && invicmdmode())
 	    DECCS();
     }
 }



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