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

@@ -4259,6 +4259,26 @@ did_set_termguicolors(optset_T *args UNUSED)
}
#endif
#if defined(FEAT_TERMINAL) || defined(PROTO)
/*
* Process the updated 'termwinscroll' option value.
*/
char *
did_set_termwinscroll(optset_T *args)
{
long *pp = (long *)args->os_varp;
char *errmsg = NULL;
if (*pp < 1)
{
errmsg = e_argument_must_be_positive;
*pp = 1;
}
return errmsg;
}
#endif
/*
* Process the updated 'terse' option value.
*/