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:
10
src/option.c
10
src/option.c
@@ -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);
|
||||
|
Reference in New Issue
Block a user