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

Re: Shift-Insert overwrites ZLE CUTBUFFER



Daniel Shahaf wrote on Tue, Nov 01, 2016 at 17:03:28 +0000:
> Oliver Kiddle wrote on Mon, Oct 31, 2016 at 16:56:54 +0100:
> > On 27 Oct, Bart wrote:
> > If Daniel's documentation from 22036 is applied, it should probably
> > also mention that in vi mode, it allows a register to be specified
> > to capture a paste. In that case, the text isn't inserted.
> 
> It had already been applied.  Here's a shot at the new text;

A bug was pointed out off-list after I committed the new text.  Here's
another shot for review.  The last hunk is in vi-set-buffer's docs.

diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo
index 63f673b..b7bb23b 100644
--- a/Doc/Zsh/zle.yo
+++ b/Doc/Zsh/zle.yo
@@ -2176,11 +2176,13 @@ This widget is invoked when text is pasted to the terminal emulator. It
 is not intended to be bound to actual keys but instead to the special
 sequence generated by the terminal emulator when text is pasted.
 
-When invoked interactively, the pasted text is inserted to the buffer.
+When invoked interactively, the pasted text is inserted to the buffer
+and placed in the cutbuffer.
 If a numeric argument is given, shell quoting will be applied to the
 pasted text before it is inserted.
-The text is also placed in the cutbuffer, or in the specified register
-(tt("x) in vi mode).
+
+When a named buffer is specified with tt(vi-set-buffer) (tt("x)),
+the pasted text is stored in that named buffer but not inserted.
 
 When called from a widget function as `tt(bracketed-paste) var(name)`, the
 pasted text is assigned to the variable var(name) and no other processing is
@@ -2410,7 +2412,7 @@ concerned replaces the previous contents of the specified buffer. If
 a named buffer is specified using a capital, the newly cut text is
 appended to the buffer instead of overwriting it. When using the tt("_)
 buffer, nothing happens. This can be useful for deleting text without
-affecting the normal registers.
+affecting any buffers.
 
 If no buffer is specified for a cut or change command, tt("1) is used, and
 the contents of tt("1) to tt("8) are each shifted along one buffer;



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