nushell / reedline

A feature-rich line editor - powering Nushell
https://docs.rs/reedline/
MIT License
547 stars 152 forks source link

[BUG] Resizing window overwrites previous output #42

Open sholderbach opened 3 years ago

sholderbach commented 3 years ago

Resizing the window now leads to unexpected behavior (observed if screen filled to the bottom, as well as if it is partially filled)

before resize (80x24)

image

after resize (80x30)

image

sholderbach commented 3 years ago

First naive approach at resetting the cursor location seems to only work for vertical resizing when performed slowly. Large resizing (both manually and by maximizing) still breaks.

Edit: corrected direction to vertical

sophiajt commented 3 years ago

I just added support for some resize support for the current prompt+input. While we don't have control over what's already on the screen, we can at least cleanup the current input the user is working on.

sholderbach commented 3 years ago

Horizontal resizing (left/right) now seems to mostly work. Vertical resizing (up/down) still eats lines. Will try to take a deeper look

sholderbach commented 2 years ago

Status after #217: Vertical resizing doesn't seem to eat lines as readily now. Changing the vertical size with the prompt at the bottom still causes #157 Horizontal resizing is now liberally eating previous output