1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 10:57:34 +00:00

LibLine: Make line management less broken when at the last line

Previously, all sorts of weird stuff would happen when the editor was at
the last line of the terminal (or when the printed line would be at the
last line), this commit makes the editor scroll the terminal up before
trying to write to a row that doesn't actually exist (yet).
This fixes ^R search making a mess when initiated at the last line
(especially with multiline prompts).
This commit is contained in:
Ali Mohammad Pur 2021-05-16 09:45:22 +04:30 committed by Linus Groh
parent 3f08e957d4
commit bbaa463032
3 changed files with 28 additions and 10 deletions

View file

@ -256,6 +256,8 @@ private:
void handle_interrupt_event();
void handle_read_event();
void ensure_free_lines_from_origin(size_t count);
Vector<size_t, 2> vt_dsr();
void remove_at_index(size_t);