Repository navigation
Closed
Description
When resizing, sometimes the wrong cursor position is read or the cursor position is missed. When this happens, the issue often persists. It takes multiple cursor position reads before seeing the latest cursor position. Clearing the terminal makes it jump every time I press enter.
Ideas:
- Try to avoid using EventStream
- Is there a problem with
terminal.get_cursor_position()and using EventStream. Doesget_cursor_positionuse read&poll but I am using EventStream and you should only use one: https://docs.rs/crossterm/latest/crossterm/event/index.html. - Maybe input queue is full? No one is consuming the regular events so the cursor position read fails?
- Could use tty instead of mio in crossterm help?
- https://www.reddit.com/r/rust/comments/1f3o33u/myterious_crossterm_input_after_running_vim/?rdt=44227
- Is cross term designed to run for the lifetime of the process? I am restarting cross term multiple times in the same process, and the drain cross term event queue is needed when cross term runs again. Will I lose input when I type multiple commands while a command is running? E.g. sleep 10, type "echo asd\necho qwe". Will I lose echo qwe? If so maybe cross term needs an unbuffered reader where it reads byte by byte without any queuing.
- Fix clear behavior in inline / fixed ratatui/ratatui#2318 the resizable inline viewport is quite new.
- try relative moves after a resize.on a resize, I know I'm on line 3 of my stuff (or maybe if I leave cursor on top line I can just leave it there), go back to top line, clear terminal from here down, then redraw.
Metadata
Metadata
Assignees
Labels
No labels
Activity
HalFrgrd commentedon Feb 24, 2026
Solved by not using EventStream . https://github.com/ratatui/ratatui/pull/1964/changes#diff-72d656d48d1931d9d49a7e24b7c96c15b8f74d53c351b3be144c37f0e0496b95R74
Alt backspace/delete: treat path-like words as slash-delimited (#396)
Bash FFI lock (#760)