From 63d8e884ddb970d6a8b5c6a7a546f0283d38a055 Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Tue, 9 May 2017 15:05:03 +0200 Subject: fix some more --- src/fe-text/term-terminfo.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/fe-text/term-terminfo.c b/src/fe-text/term-terminfo.c index 0b2c7cb0..4d5ca65b 100644 --- a/src/fe-text/term-terminfo.c +++ b/src/fe-text/term-terminfo.c @@ -576,8 +576,9 @@ int term_addstr(TERM_WINDOW *window, const char *str) void term_clrtoeol(TERM_WINDOW *window) { if (vcx < window->x) { - /* we just wrapped outside of the split, put the cursor back into the window */ + /* we just wrapped outside of the split, warp the cursor back into the window */ vcx += window->x; + vcmove = TRUE; } if (window->x + window->width < term_width) { /* we need to fill a vertical split */ @@ -606,6 +607,10 @@ void term_clrtoeol(TERM_WINDOW *window) void term_window_clrtoeol(TERM_WINDOW* window, int ypos) { + if (ypos >= 0 && window->y + ypos != vcy) { + /* the line is already full */ + return; + } term_clrtoeol(window); if (window->x + window->width < term_width) { gui_printtext_window_border(window->x + window->width, window->y + ypos); -- cgit v1.2.3