From a027ce3bf46727889ec14c396f57fec30496bf47 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 25 Sep 2015 23:00:43 -0700 Subject: linenoise: no upward retrace after suspend resume. * linenoise/linenoise.c (edit): After coming back from a Ctrl-Z suspend, set l->maxrows to zero to force refresh_multiline to draw the buffer from the current cursor position down, without any retrograde cursor movement to above lines, trying to refresh existing lines which are not there. --- linenoise/linenoise.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linenoise/linenoise.c b/linenoise/linenoise.c index 2ba472f5..a48ad4d1 100644 --- a/linenoise/linenoise.c +++ b/linenoise/linenoise.c @@ -1976,6 +1976,7 @@ static int edit(lino_t *l, const char *prompt) disable_raw_mode(l); raise(SIGTSTP); enable_raw_mode(l); + l->maxrows = 0; l->dpos = dpos; l->need_refresh = 1; } -- cgit v1.2.3