Permalink
Browse files

patch 8.0.0938: scrolling in terminal window is inefficient

Problem:    Scrolling in terminal window is inefficient.
Solution:   Use win_del_lines().
  • Loading branch information...
brammool committed Aug 13, 2017
1 parent bce4f62 commit 6bb18a878cc4cc79cdca4b7497367e59a90125e7
Showing with 14 additions and 7 deletions.
  1. +12 −7 src/terminal.c
  2. +2 −0 src/version.c
View
@@ -38,11 +38,6 @@
* in tl_scrollback are no longer used.
*
* TODO:
* - add a character in :ls output
* - add 't' to mode()
* - use win_del_lines() to make scroll-up efficient.
* - Make StatusLineTerm adjust UserN highlighting like StatusLineNC does, see
* use of hightlight_stlnc[].
* - implement term_setsize()
* - add test for giving error for invalid 'termsize' value.
* - support minimal size when 'termsize' is "rows*cols".
@@ -1495,11 +1490,21 @@ handle_damage(VTermRect rect, void *user)
}
static int
handle_moverect(VTermRect dest UNUSED, VTermRect src UNUSED, void *user)
handle_moverect(VTermRect dest, VTermRect src, void *user)
{
term_T *term = (term_T *)user;
win_T *wp;
/* TODO */
if (dest.start_col == src.start_col
&& dest.end_col == src.end_col
&& dest.start_row < src.start_row)
FOR_ALL_WINDOWS(wp)
{
if (wp->w_buffer == term->tl_buffer)
/* scrolling up is much more efficient when deleting lines */
win_del_lines(wp, dest.start_row,
src.start_row - dest.start_row, FALSE, FALSE);
}
redraw_buf_later(term->tl_buffer, NOT_VALID);
return 1;
}
View
@@ -769,6 +769,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
938,
/**/
937,
/**/

0 comments on commit 6bb18a8

Please sign in to comment.