Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] Include number of chars in zle unget mechanism in $PENDING calculation
- X-seq: zsh-workers 40675
- From: Eric Freese <ericdfreese@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] Include number of chars in zle unget mechanism in $PENDING calculation
- Date: Tue, 28 Feb 2017 18:25:34 -0700
- Cc: Eric Freese <ericdfreese@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=sendgrid.net; h=from:to:cc:subject; s=smtpapi; bh=p2kliUcMTLiw53KWYxdMr2Ln4s0=; b=oRTI6kjuO7mmuyl/OqFzaaS57jgiQzRRYzeQM2cX+x/K3at10Rf4c0koKvEh5K AmxFOkTlxanFqC04U+0QIzZ1aFN3ulhg8EvVgkgDmygfSXWdIC3+eNFSlnMLnywh plBGWdGZnZYeT4G1xClIB/4gsZBSMU2HZoEVKUOCd1qoY=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Tested locally with the following:
% self-insert() { echo "$PENDING" >> log; zle .self-insert -- $@ }
% zle -N self-insert
% foo() { zle -U "hello"; zle -U "world" }
% zle -N foo
% bindkey ^B foo
After pressing C-b, the buffer reads:
worldhello
And the contents of log are:
9
8
7
6
5
4
3
2
1
0
---
Src/Zle/zle_params.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Src/Zle/zle_params.c b/Src/Zle/zle_params.c
index 1e4c5b8..476e9a7 100644
--- a/Src/Zle/zle_params.c
+++ b/Src/Zle/zle_params.c
@@ -512,7 +512,7 @@ get_bufferlines(UNUSED(Param pm))
static zlong
get_pending(UNUSED(Param pm))
{
- return noquery(0);
+ return kungetct + noquery(0);
}
/**/
--
2.9.0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author