From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24245 invoked by alias); 1 Mar 2017 01:31:26 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 40675 Received: (qmail 23844 invoked from network); 1 Mar 2017 01:31:26 -0000 X-Qmail-Scanner-Diagnostics: from o1.20qt.s2shared.sendgrid.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(167.89.106.64):SA:0(1.5/5.0):. Processed in 0.459423 secs); 01 Mar 2017 01:31:26 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: * X-Spam-Status: No, score=1.5 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NML_ADSP_CUSTOM_MED,RP_MATCHES_RCVD,SPF_PASS,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: bounces+4683779-8d61-zsh-workers=zsh.org@sendgrid.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at sendgrid.biz designates 167.89.106.64 as permitted sender) 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= From: Eric Freese To: zsh-workers@zsh.org Cc: Eric Freese Subject: [PATCH] Include number of chars in zle unget mechanism in $PENDING calculation Date: Tue, 28 Feb 2017 18:25:34 -0700 Message-Id: <20170301012534.67145-1-ericdfreese@gmail.com> X-Mailer: git-send-email 2.9.0 X-SG-EID: i+zOheVB0lMUqP0z3X/8PPLe+C1hDfxH7g5ommK/LCrGhRB1IOgL5oBDk0WbKmSZ8PVOqgkzZzeIZK jLS+eum7OePzujCU6PfMDc4Xxpo2j1FVaM60qcaMdKWnT6TMQ4j/AkN0JYrJ9YUDU2vNUEr5zglq2q YMWCPW/z79wFosaQ8L22nl/mqlrdhJBcR76u0I7lzbHHmCTOA/FbBNi6yqWkVxdxrOk3uPbs9ACfGR M= 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