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

Re: Geoff's prompt escape sequences patch (workers/23924)



On Nov 16,  3:57pm, Mikael Magnusson wrote:
} Subject: Re: Geoff's prompt escape sequences patch (workers/23924)
}
} I've found another problem that seems to be caused by this patch
} (located by git-bisect). When a bg'd job finishes, the cursor is drawn
} in the wrong place in the new prompt (#bar characters to the left).

It would appear that the starting position for the right prompt is not
being recomputed correctly.  It's not just that the cursor is moved
left; RPS1 still begins at the same column even though it is shorter,
so it doesn't reach all the way to the margin.

The cursor positioning error is probably only apparent when the number
of bytes in the terminfo "move left N" string is less than the number
in "move to position X,Y".

} The simplest test case i could find was
} zsh -f
} PS1="frobnizz %#"      #not really needed but since the default
} depends on hostname...
} RPS1="foo%(1j.bar.)"
} true &

The effect is more obvious if you change to RPS1="%(1j.bar.)foo"



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