Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: yet another undesired 3.1.5-pws-15 change



Peter Stephenson <pws@xxxxxxxxxxxxxxxxx> typed:
:Timothy J Luoma wrote:
:> There's still a problem with my PROMPT:
:> PROMPT='
:> ---------------------------------------- %t/%T  
:> ----------------------------------------
:> %S[OLDPWD: $OLDPWD]
:>    [PWD: %~]%s
:> %B%n$LOCAL_HOST%b $REMOTE_HOST
:> '
:> it produces an extra blank line at the end (unlike 3.1.4)
:
:I didn't dare fix this when I originally spotted it, but I think the answer
:is the following.  It doesn't have any immediately obvious ill effects.
:-	    if (lpromptw == 0)
:+	    if (lpromptw == 0 && lprompth == 1)
: 		zputs("\n", shout);	/* works with both hasam and !hasam */

This can't really work, can it.  Say your term width is 80 and your prompt
is 80 chars long, then lpromptw == 0 && lprompth == 2.  Now the cursor is
sitting at the right column and wants to be in the left column, but you've
just avoided putting it there and if you don't have automargin (hasam == 1)
then you're stuffed.  There needs to be a method to differentiate between
having your cursor at 0 and at 80 which probably isn't in there now but
shouldn't be hard to add.  I'll look at doing a patch for this now.

Regards,
-- 
Geoff Wing   <gcw@xxxxxxxxx>            Mobile : (Australia) 0413 431 874 <<<new
Work URL: http://www.primenet.com.au/   Ego URL: http://pobox.com/~gcw/



Messages sorted by: Reverse Date, Date, Thread, Author