|
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; |
@@ -1925,6 +1926,10 @@ handle_moverect(VTermRect dest, VTermRect src, void *user) |
1925 | 1926 | clear_attr); |
1926 | 1927 | } |
1927 | 1928 | } |
| 1929 | + |
| 1930 | + term->tl_dirty_row_start = MIN(term->tl_dirty_row_start, dest.start_row); |
| 1931 | + term->tl_dirty_row_end = MIN(term->tl_dirty_row_end, dest.end_row); |
| 1932 | + |
1928 | 1933 | redraw_buf_later(term->tl_buffer, NOT_VALID); |
1929 | 1934 | return 1; |
1930 | 1935 | } |
@@ -2268,8 +2273,8 @@ term_update_window(win_T *wp) |
2268 | 2273 | vterm_state_get_cursorpos(state, &pos); |
2269 | 2274 | position_cursor(wp, &pos); |
2270 | 2275 |
|
2271 | | - /* TODO: Only redraw what changed. */ |
2272 | | - for (pos.row = 0; pos.row < wp->w_height; ++pos.row) |
| 2276 | + for (pos.row = term->tl_dirty_row_start; pos.row < term->tl_dirty_row_end |
| 2277 | + && pos.row < wp->w_height; ++pos.row) |
2273 | 2278 | { |
2274 | 2279 | int off = screen_get_current_line_off(); |
2275 | 2280 | int max_col = MIN(wp->w_width, term->tl_cols); |
@@ -2352,6 +2357,8 @@ term_update_window(win_T *wp) |
2352 | 2357 | screen_line(wp->w_winrow + pos.row, wp->w_wincol, |
2353 | 2358 | pos.col, wp->w_width, FALSE); |
2354 | 2359 | } |
| 2360 | + term->tl_dirty_row_start = MAX_ROW; |
| 2361 | + term->tl_dirty_row_end = 0; |
2355 | 2362 |
|
2356 | 2363 | return OK; |
2357 | 2364 | } |
|
0 commit comments