1
0
forked from aniani/vim

patch 9.1.0808: Terminal scrollback doesn't shrink when decreasing 'termwinscroll'

Problem:  Terminal scrollback doesn't shrink when reducing
          'termwinscroll'
Solution: Check if option value was decreased (Milly).

closes: #15904

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Milly
2024-10-22 23:17:45 +02:00
committed by Christian Brabandt
parent 3e5bbb8e11
commit 6d5f4a0bed
8 changed files with 45 additions and 2 deletions

View File

@@ -3436,7 +3436,8 @@ limit_scrollback(term_T *term, garray_T *gap, int update_buffer)
if (gap->ga_len < term->tl_buffer->b_p_twsl)
return;
int todo = term->tl_buffer->b_p_twsl / 10;
int todo = MAX(term->tl_buffer->b_p_twsl / 10,
gap->ga_len - term->tl_buffer->b_p_twsl);
int i;
curbuf = term->tl_buffer;