mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.0.0938: scrolling in terminal window is inefficient
Problem: Scrolling in terminal window is inefficient. Solution: Use win_del_lines().
This commit is contained in:
parent
bce4f62d30
commit
6bb18a878c
@ -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;
|
||||
}
|
||||
|
@ -769,6 +769,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
938,
|
||||
/**/
|
||||
937,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user