<brocellous>
WhyNotHugo: scrolling by LINES-1 will add blanks in teh scrollback for every line below the cursor
<brocellous>
If you want it compact (so that scrolling up by 1 gives you the most recent output line) you have to either print a screen of newlines to get it to scroll just enough, or calculate the scroll based on the cursor position.
<brocellous>
I hit ctrl-l a lot, so inserting nearly a full screen of blanks everytime into the scrollback makes the scrollback a lot less useful.
<WhyNotHugo>
brocellous: Oh, this is so much nicer! I hope you succeed in adding this to the wiki, thanks!
<brocellous>
it tries to calculate the corretc scroll based on teh cursor position, and tries to consider for multibuffer commands (in addition to multiline buffers)
<brocellous>
unfortunately read/write to the TTY within a zle widget isn't technically supported. In this case I think it will always work, but zle can be gnarly and it is considered a hack.
<brocellous>
zshzle(1) documents that reading from the tty may unintentionally block zle.
<brocellous>
So, last night, I finally came up with a version that does not read from the tty and gives the correct scroll behavior
<brocellous>
I found that without the \e7/\e8 cursor save/restore escapes foot would sometimes draw the cursor in position 1,1 before the prompt was redrawn by zsh so I added them in to avoid that brief flash
alexherbo2 has joined #foot
alexherbo2 has quit [Remote host closed the connection]