1
0
forked from aniani/vim

patch 9.0.0640: cannot scroll by screen line if a line wraps

Problem:    Cannot scroll by screen line if a line wraps.
Solution:   Add the 'smoothscroll' option.  Only works for CTRL-E and CTRL-Y
            so far.
This commit is contained in:
Bram Moolenaar
2022-10-02 21:29:55 +01:00
parent ff85d4a107
commit f6196f4244
18 changed files with 312 additions and 29 deletions

View File

@@ -2964,6 +2964,15 @@ set_bool_option(
}
#endif
else if ((int *)varp == &curwin->w_p_sms)
{
if (!curwin->w_p_sms)
{
curwin->w_skipcol = 0;
changed_line_abv_curs();
}
}
// when 'textmode' is set or reset also change 'fileformat'
else if ((int *)varp == &curbuf->b_p_tx)
{
@@ -5436,6 +5445,7 @@ get_varp(struct vimoption *p)
case PV_RLC: return (char_u *)&(curwin->w_p_rlc);
#endif
case PV_SCROLL: return (char_u *)&(curwin->w_p_scr);
case PV_SMS: return (char_u *)&(curwin->w_p_sms);
case PV_WRAP: return (char_u *)&(curwin->w_p_wrap);
#ifdef FEAT_LINEBREAK
case PV_LBR: return (char_u *)&(curwin->w_p_lbr);