From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121 invoked by alias); 1 Dec 2017 10:17:16 -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: List-Unsubscribe: X-Seq: 42068 Received: (qmail 9014 invoked by uid 1010); 1 Dec 2017 10:17:16 -0000 X-Qmail-Scanner-Diagnostics: from aok120.rev.netart.pl 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(85.128.245.120):SA:0(-1.9/5.0):. Processed in 7.117395 secs); 01 Dec 2017 10:17:16 -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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: psprint@zdharma.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Virus-Scanned: by amavisd-new using ClamAV (21) Date: Fri, 1 Dec 2017 11:16:59 +0100 From: Sebastian Gniazdowski To: Pika Mao , zsh-workers@zsh.org Message-ID: In-Reply-To: References: Subject: Re: `reset-prompt` multiple times cause multiline PROMPT redraw in the wrong place X-Mailer: Airmail (442) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On 1 Dec 2017 at 11:04:30, Pika Mao (leomaoyw@gmail.com) wrote: > Hello, > > If I add a vim mode indicator to a multiline PROMPT, then the sequence > `^[i` (alt-i) will cause the prompt redraw in the wrong place. > > The problem seems to be that `reset-prompt` is called multiple times in one > execution cycle. I might have something related: myfun() { sched -o +1 myfun; } sched -o +1 myfun It uses "-o" option that should help outputting to terminal. However the unexpected effect in this example is that new prompt is shown each execution (each second in this case). -- Sebastian Gniazdowski psprint /at/ zdharma.org