EgorMaksimov / mintty

Automatically exported from code.google.com/p/mintty
GNU General Public License v3.0
0 stars 0 forks source link

Scrollback jumps back when printing shell prompt #134

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Right now mintty will reset scrollback on display output.  Is it possible
to enable 2 toggles for scrollback reset?  One for keypress and one for
display output?

Original issue reported on code.google.com by dh.darre...@gmail.com on 13 Oct 2009 at 3:47

GoogleCodeExporter commented 8 years ago
It should only reset on keypress anyway. If you see it resetting on output, then
that's a bug.

What you might be seeing is that the scrollback buffer is full, so eventually 
the bit
that's shown on screen will be at the edge of the buffer, and then get dropped 
as new
output arrives. You could increase the scrollback buffer size to delay that 
effect.

Original comment by andy.koppe on 13 Oct 2009 at 4:49

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I just tested this out with 0.5.1-1 (had 0.4.3-1 installed earlier).  The 
behavior of
output reseting scrollback still occurs.  Easy to duplicate, I'll create about 
200
lines of scroll, then "sleep 10; echo", scroll back 1 screenfull, after 10 
seconds
the scrollback reset occurs.  I'm definitely not hitting the 10k limit.

Some further testing shows it only occurs when a command completes, causing a 
new
prompt.  Continuous output from an existing program doesn't appear to cause the 
reset.

So sleep then echo causes reset, but vmstat 1 60 does not.

Original comment by dh.darre...@gmail.com on 13 Oct 2009 at 7:56

GoogleCodeExporter commented 8 years ago
Reproduced, thanks for the report.

Strangely, I only see this with zsh, not with bash, so there might be something
different about zsh's prompt.

Original comment by andy.koppe on 13 Oct 2009 at 11:28

GoogleCodeExporter commented 8 years ago
zsh's ZLE does quite a bit of screen redraws, especially if you're using a 
right hand
prompt.  If you're like me and also use the precmd() function for titlebar 
changes,
that's even more escape sequences that could possibly happen.

For instance, my precmd() is such -

precmd () { print -Pn "\e]2;%n@%M | %~\a" } # title bar prompt

Here's an escaped version of what the prompt looks like, including precmd(), 
lefthand
and righthand prompts.

\e]2;user@hostname | ~^G
\e[0m\e[27mESC[24m\e[J(hostname)\e[1m~\e[0m: \e[K\e[111C  8:40AM\e[119D

It could be the cleareos ED0, cleareol EL0, or cursorlf(n) CUB commands

Original comment by dh.darre...@gmail.com on 13 Oct 2009 at 12:47

GoogleCodeExporter commented 8 years ago
Fixed in r609 on 0.5 branch.

It was the ED0 wot did it.

Original comment by andy.koppe on 13 Oct 2009 at 8:25

GoogleCodeExporter commented 8 years ago

Original comment by andy.koppe on 23 Oct 2009 at 5:17