fix: adjust cursor start position for large buffers#900
Conversation
|
Thanks for trying to make nushell and reedline better. Please help me understand how this fixes the issue. If my screen height is 50 how is queuing 50 |
|
Since reedline uses crossterm and crossterm uses ansi escape sequences to implement the function, I can use nushell to emulate the behavior.
|
|
But don't you have a bunch of empty lines after the buffer? |
|
The demo does have, but the nushell I compiled after patching not. |
7e611f1 to
af8a02e
Compare
|
I was experiencing this issue but I wasn't sure if it was caused by my terminal emulator or nushell/reedline. Thank you for working on this! |
|
Thanks! |
| for _ in 0..screen_height - lines.required_lines(screen_width, None) { | ||
| self.stdout.queue(Print(&coerce_crlf("\n")))?; | ||
| } |
There was a problem hiding this comment.
I've pushed what I consider to be a proper fix to #898 (since there might be a value useful for both issues), Please review that when you get time.
There was a problem hiding this comment.
@blindFS sorry for the slow reply, your PR was already merged by the time i got the time to take a look so i just forgot about it.
Besides, I'm not sure whether we should take
lines.hintinto account here.
getting a multiline hint can similarly push text up, not taking that into account can cause lines to disappear as well.
There was a problem hiding this comment.
getting a multiline hint can similarly push text up, not taking that into account can cause lines to disappear as well.
Say we have a large_buffer repaint caused by a long multiline hint, if we add the height of self.hint to lines.required_lines, we'll end up not doing any scrolling. Is that expected behavior?



nushell/nushell#15436