From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14945 invoked by alias); 7 Feb 2014 16:46:23 -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: 32364 Received: (qmail 22930 invoked from network); 7 Feb 2014 16:46:17 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <140207084619.ZM28881@torch.brasslantern.com> Date: Fri, 07 Feb 2014 08:46:19 -0800 In-reply-to: <15702.1391766336@thecus.kiddle.eu> Comments: In reply to Oliver Kiddle "Re: Pre-5.0.5 part 3: Heuristic for ZLE_RPROMPT_INDENT" (Feb 7, 10:45am) References: <140202135837.ZM15483@torch.brasslantern.com> <15702.1391766336@thecus.kiddle.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Pre-5.0.5 part 3: Heuristic for ZLE_RPROMPT_INDENT MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Feb 7, 10:45am, Oliver Kiddle wrote: } } On 2 Feb, Bart wrote: } > Another one we agreed to leave for after a stable release. This takes a } > best guess at whether the terminal can handle having a character written } > to the lower right corner } } This is resulting in my cursor appearing one column more to the left } than it should. This is one of the expected bad behaviors which is the reason we left out the hueristic. } Actually, ZLE_RPROMPT_INDENT=0 with 5.0.5 is enough for that to occur. That would be expected; the heuristic doesn't do anything other than set an initial value for ZLE_RPROMPT_INDENT. } This effect seems to occur only on some terminals but may be version } specific because I get different results for the same terminal on } different systems. More likely it's termcap/terminfo database version specific. Can you compare the terminfo settings for two cases of the same terminal giving different behavior and report the difference? If it's not terminfo, it may be some kind of emulation option that has a different setting in the Xdefaults etc. } None of the terminals I have are attempting to scroll when writing to } the bottom right corner. The ones that work are ignoring a subsequent } backward cursor movement - as if the cursor had really moved beyond the } edge of terminal. This is exactly the thing that terminfo reports unreliably, which is why the default for years has been to keep the right prompt indented one space from the right margin. I was hoping the newer sam/YE terminfo/cap value would provide the right clue, and be widespread enough now to be reliable. If we can't improve the heuristic we should just remove it again. } Is it perhaps possible to fix this by changing from a relative to an } absolute cursor movement after the RPROMPT is displayed? Unfortunately, no; once completion listings and other stuff that is displayed below the prompt become involved, ZLE no longer knows what its absolute cursor position ought to be. It would need a really big rewrite to do real full-screen management for absolute positioning to work.