Skip to content

Commit c233aed

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 9c2f5e7 + 3a497e1 commit c233aed

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

src/pty.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,11 @@ OpenPTY(char **ttyn)
267267
}
268268
#endif
269269

270-
#if defined(HAVE_SVR4_PTYS) && !defined(PTY_DONE) && !defined(hpux) && !defined(MACOS_X)
270+
#if defined(HAVE_SVR4_PTYS) && !defined(PTY_DONE) && !defined(hpux) \
271+
&& !(defined(MACOS_X) && !defined(MAC_OS_X_VERSION_10_6))
271272

272273
/* NOTE: Even though HPUX can have /dev/ptmx, the code below doesn't work!
273-
* Same for Mac OS X Leopard. */
274+
* Same for Mac OS X Leopard (10.5). */
274275
#define PTY_DONE
275276
int
276277
OpenPTY(char **ttyn)

src/terminal.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
* - in GUI vertical split causes problems. Cursor is flickering. (Hirohito
4242
* Higashi, 2017 Sep 19)
4343
* - Shift-Tab does not work.
44+
* - after resizing windows overlap. (Boris Staletic, #2164)
4445
* - double click in Window toolbar starts Visual mode.
4546
* - Redirecting output does not work on MS-Windows, Test_terminal_redir_file()
4647
* is disabled.
@@ -134,7 +135,7 @@ struct terminal_S {
134135
char_u *tl_status_text; /* NULL or allocated */
135136

136137
/* 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 */
138139
int tl_dirty_row_end; /* row below last one to update */
139140

140141
garray_T tl_scrollback;
@@ -1930,6 +1931,10 @@ handle_moverect(VTermRect dest, VTermRect src, void *user)
19301931
clear_attr);
19311932
}
19321933
}
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+
19331938
redraw_buf_later(term->tl_buffer, NOT_VALID);
19341939
return 1;
19351940
}
@@ -2273,8 +2278,8 @@ term_update_window(win_T *wp)
22732278
vterm_state_get_cursorpos(state, &pos);
22742279
position_cursor(wp, &pos);
22752280

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)
22782283
{
22792284
int off = screen_get_current_line_off();
22802285
int max_col = MIN(wp->w_width, term->tl_cols);
@@ -2357,6 +2362,8 @@ term_update_window(win_T *wp)
23572362
screen_line(wp->w_winrow + pos.row, wp->w_wincol,
23582363
pos.col, wp->w_width, FALSE);
23592364
}
2365+
term->tl_dirty_row_start = MAX_ROW;
2366+
term->tl_dirty_row_end = 0;
23602367

23612368
return OK;
23622369
}

src/version.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,10 @@ static char *(features[]) =
776776

777777
static int included_patches[] =
778778
{ /* Add new patch number below this line */
779+
/**/
780+
1167,
781+
/**/
782+
1166,
779783
/**/
780784
1165,
781785
/**/

0 commit comments

Comments
 (0)