mirror of
https://github.com/openwrt/openwrt.git
synced 2025-03-13 15:56:55 +00:00
ucode-mod-uline: fix prompt after set_hint with string bigger than the window size
Redraw the prompt after the hint instead of trying to move backwards Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
06c6481e7f
commit
15c27ce9f0
@ -880,7 +880,14 @@ void uline_set_hint(struct uline_state *s, const char *str, size_t len)
|
||||
pos_add_string(s, &s->cursor_pos, str, len);
|
||||
}
|
||||
|
||||
set_cursor(s, prev_pos);
|
||||
if (s->cursor_pos.y >= s->rows) {
|
||||
if (s->cursor_pos.x > 0)
|
||||
vt100_next_line(s->output);
|
||||
s->cursor_pos = (struct pos){};
|
||||
s->full_update = true;
|
||||
} else {
|
||||
set_cursor(s, prev_pos);
|
||||
}
|
||||
fflush(s->output);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user