From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3986 invoked by alias); 5 Jan 2017 15:01:49 -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: 40272 Received: (qmail 8817 invoked from network); 5 Jan 2017 15:01:49 -0000 X-Qmail-Scanner-Diagnostics: from mailout2.w1.samsung.com 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(210.118.77.12):SA:0(-8.2/5.0):. Processed in 1.320356 secs); 05 Jan 2017 15:01:49 -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=-8.2 required=5.0 tests=RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: p.stephenson@samsung.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at samsung.com does not designate permitted sender hosts) X-AuditID: cbfec7f5-f79676d00000294c-e7-586e5fd3d0ac Date: Thu, 05 Jan 2017 15:01:35 +0000 From: Peter Stephenson To: Zsh Hackers' List Subject: Re: 'zle redisplay' bug in 5.3? Message-id: <20170105150135.75a490bb@pwslap01u.europe.root.pri> In-reply-to: <170105010914.ZM1529@torch.brasslantern.com> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrDIsWRmVeSWpSXmKPExsWy7djP87qX4/MiDGa8kbI42PyQyYHRY9XB D0wBjFFcNimpOZllqUX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RYBVYkrnccZQWw2AUOJqZtm A9kcHCIC2hLtH8VATGEBDYkDFyRAKngF7CVWTL4GtphTwFJi7spVjBAj9zNKrF40lwkkwS+g L3H17ycmiOvsJWZeOcMI0Swo8WPyPRYQm1lAS2LztiZWCFteYvOat8wQd6pL3Li7m30Co/As JC2zkLTMQtKygJF5FaNIamlxbnpusZFecWJucWleul5yfu4mRmAMbTv2c8sOxq53wYcYBTgY lXh4I7zyIoRYE8uKK3MPMUpwMCuJ8D6LAQrxpiRWVqUW5ccXleakFh9iNAWGy0RmKdHkfGB8 55XEG5oYmlsaGhlbWJgbGSmJ8079cCVcSCA9sSQ1OzW1ILUIpo+Jg1OqgZHHYcv59A0rC5Yf DbNar7vA8M2v/ar78qy/WSnu1Loo0tdmvO5jpV/FbU65MMP55kf/qJvvumL/l6e8QaauwmvJ 9R28yu9er7ogtFPqvLng/1KOX47zlhj85nhSc+Hf2c9cBpfiEzr1OQ5YXf90eN1mgUfPJj+I 7/XJKcnnX61d5LbC1qDygYQSS3FGoqEWc1FxIgCYOXLqtwIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170105150139eucas1p136c9e09082755c1ae1cf121a03d95d55 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?UTF-8?B?UGV0ZXIgU3RlcGhlbnNvbhtTQ1NDLURhdGEgUGxhbmUb?= =?UTF-8?B?7IK87ISx7KCE7J6QG1ByaW5jaXBhbCBFbmdpbmVlciwgU29mdHdhcmU=?= X-Global-Sender: =?UTF-8?B?UGV0ZXIgU3RlcGhlbnNvbhtTQ1NDLURhdGEgUGxhbmUbU2Ft?= =?UTF-8?B?c3VuZyBFbGVjdHJvbmljcxtQcmluY2lwYWwgRW5naW5lZXIsIFNvZnR3YXJl?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDA1Q0QwNTAwNTg=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170105091042epcas1p3ebc6c107d3121c8f6b980bbcbc59bc60 X-RootMTR: 20170105091042epcas1p3ebc6c107d3121c8f6b980bbcbc59bc60 References: <20170105030137.v4tzweda6pxyqnrq@majutsushi.net> <170105010914.ZM1529@torch.brasslantern.com> On Thu, 5 Jan 2017 01:09:14 -0800 Bart Schaefer wrote: > On Jan 5, 4:01pm, Jan Larres wrote: > } > } expand-or-complete-with-dots() { > } echo -ne "\e[31m......\e[0m" > } zle expand-or-complete > } zle redisplay > } } > > Hmm. Indeed, with multi-line prompts, invoking redisplay immediately > after a completion menu is displayed will move the cursor upward as > many extra lines as the prompt is tall but then does not finish the > repainting of the prompt, leaving the cursor in the wrong place. > > You don't even need compinit, just do: > > % PS1=$':first line\n'"$PS1" > :first line > % ls > :first line > % ls > > and you'll observe zle get confused. > > This is from workers/38048z ... where I asked for additional feedback > and got none ... discussion starts in users/21315. > > I suspect something is different about the complist module vs. plain > completion menu and the change in 38048 does not account for the > latter. I don't know anything about this beyond the fact that showinglist has three values: off, an extra special clever value (-1), and an extra extra special very very clever value (-2), and no normal values (> 0) because that wouldn't be clever enough. The documentation says /* Most lines of the buffer we've shown at once with the current list * * showing. == 0 if there is no list. == -1 if a new list has just * * been put on the screen. == -2 if zrefresh() needs to put up a new * * list. */ /**/ mod_export int showinglist; Is it a case of the two requiring different handling? You might have thought the different behaviour was the one where the new list was needed as in the other cases the screen is already in a consistent state (perhaps?) Something like the following? pws diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c index 8d173cd..49ce154 100644 --- a/Src/Zle/zle_refresh.c +++ b/Src/Zle/zle_refresh.c @@ -2434,8 +2434,13 @@ redisplay(UNUSED(char **args)) moveto(0, 0); zputc(&zr_cr); /* extra care */ tc_upcurs(lprompth - 1); - resetneeded = !showinglist; - clearflag = showinglist; + if (showinglist == -2) { + resetneeded = 0; + clearflag = 1; + } else { + resetneeded = 1; + clearflag = 0; + } return 0; }