diff src/option.c @ 30610:6c6ac189a05f v9.0.0640

patch 9.0.0640: cannot scroll by screen line if a line wraps Commit: https://github.com/vim/vim/commit/f6196f424474e2a9c160f2a995fc2691f82b58f9 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Oct 2 21:29:55 2022 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Sun, 02 Oct 2022 22:30:15 +0200
parents 6a1862bfb280
children c2031ad5ed54
line wrap: on
line diff
--- a/src/option.c
+++ b/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);