|
41 | 41 | * - in GUI vertical split causes problems. Cursor is flickering. (Hirohito |
42 | 42 | * Higashi, 2017 Sep 19) |
43 | 43 | * - Shift-Tab does not work. |
| 44 | + * - after resizing windows overlap. (Boris Staletic, #2164) |
44 | 45 | * - double click in Window toolbar starts Visual mode. |
45 | 46 | * - Redirecting output does not work on MS-Windows, Test_terminal_redir_file() |
46 | 47 | * is disabled. |
@@ -134,7 +135,7 @@ struct terminal_S { |
134 | 135 | char_u *tl_status_text; /* NULL or allocated */ |
135 | 136 |
|
136 | 137 | /* Range of screen rows to update. Zero based. */ |
137 | | - int tl_dirty_row_start; /* -1 if nothing dirty */ |
| 138 | + int tl_dirty_row_start; /* MAX_ROW if nothing dirty */ |
138 | 139 | int tl_dirty_row_end; /* row below last one to update */ |
139 | 140 |
|
140 | 141 | garray_T tl_scrollback; |
@@ -1930,6 +1931,10 @@ handle_moverect(VTermRect dest, VTermRect src, void *user) |
1930 | 1931 | clear_attr); |
1931 | 1932 | } |
1932 | 1933 | } |
| 1934 | + |
| 1935 | + term->tl_dirty_row_start = MIN(term->tl_dirty_row_start, dest.start_row); |
| 1936 | + term->tl_dirty_row_end = MIN(term->tl_dirty_row_end, dest.end_row); |
| 1937 | + |
1933 | 1938 | redraw_buf_later(term->tl_buffer, NOT_VALID); |
1934 | 1939 | return 1; |
1935 | 1940 | } |
@@ -2273,8 +2278,8 @@ term_update_window(win_T *wp) |
2273 | 2278 | vterm_state_get_cursorpos(state, &pos); |
2274 | 2279 | position_cursor(wp, &pos); |
2275 | 2280 |
|
2276 | | - /* TODO: Only redraw what changed. */ |
2277 | | - for (pos.row = 0; pos.row < wp->w_height; ++pos.row) |
| 2281 | + for (pos.row = term->tl_dirty_row_start; pos.row < term->tl_dirty_row_end |
| 2282 | + && pos.row < wp->w_height; ++pos.row) |
2278 | 2283 | { |
2279 | 2284 | int off = screen_get_current_line_off(); |
2280 | 2285 | int max_col = MIN(wp->w_width, term->tl_cols); |
@@ -2357,6 +2362,8 @@ term_update_window(win_T *wp) |
2357 | 2362 | screen_line(wp->w_winrow + pos.row, wp->w_wincol, |
2358 | 2363 | pos.col, wp->w_width, FALSE); |
2359 | 2364 | } |
| 2365 | + term->tl_dirty_row_start = MAX_ROW; |
| 2366 | + term->tl_dirty_row_end = 0; |
2360 | 2367 |
|
2361 | 2368 | return OK; |
2362 | 2369 | } |
|
0 commit comments