From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10874 invoked from network); 11 Jul 2004 03:42:36 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.85) by ns1.primenet.com.au with SMTP; 11 Jul 2004 03:42:35 -0000 Received: (qmail 9686 invoked from network); 11 Jul 2004 03:44:52 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 Jul 2004 03:44:52 -0000 Received: (qmail 7525 invoked by alias); 11 Jul 2004 03:41:57 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7674 Received: (qmail 7514 invoked from network); 11 Jul 2004 03:41:56 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.85) by sunsite.dk with SMTP; 11 Jul 2004 03:41:56 -0000 Received: (qmail 8665 invoked from network); 11 Jul 2004 03:44:19 -0000 Received: from unknown (HELO moonbase.zanshin.com) (@167.160.213.139) by a.mx.sunsite.dk with SMTP; 11 Jul 2004 03:44:06 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.12.11/8.12.11) with ESMTP id i6B3feTl004332 for ; Sat, 10 Jul 2004 20:41:40 -0700 Date: Sat, 10 Jul 2004 20:41:40 -0700 (PDT) From: Bart Schaefer Reply-To: zsh-users@sunsite.dk To: zsh-users@sunsite.dk Subject: Re: terminal resizing and prompt problem In-Reply-To: <20040710172553.168f14b9@localhost> Message-ID: References: <20040710172553.168f14b9@localhost> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 On Sat, 10 Jul 2004, Nathan Sommer wrote: > For each character height I resize vertically, or each character width I > resize horizontally, the top line of my prompt is repeated. [...] > This is terribly annoying, since it means I can't resize my terminal to > see more output, since any additional visibility I would have gained is > taken up by the additional lines of my prompt. Precisely how are you resizing the terminal? Zsh reprints the prompt each time it gets a SIGWINCH signal. Normally, e.g. when dragging the window borders with the mouse, there would be only a one such signal delivered at the time the mouse was released. It sounds as though you -- or your window manager -- is performing e.g. six resizes of one line each rather than one resize of six lines, causing zsh to receive a stream of SIGWINCH signals. This is not a bug in zsh. When zsh reprints the prompt, it moves the cursor to the beginning of the line (prints a carriage return without a line feed) and then displays the prompt. The line editor only keeps track of where it is on the current line, not what may have gone on before it got there, so it doesn't try to move up to wherever it was when the prompt began printing. This could be considered a misfeature, but printing the prompt is entirely a separate action from editing the command line (the prompt is printed the same way whether ZLE is enabled or not). However, you wouldn't notice (or at least it wouldn't be so annoying) if your resizing signals weren't behaving so oddly.