diff src/structs.h @ 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 72e6073a2822
children f2f35161d75a
line wrap: on
line diff
--- a/src/structs.h
+++ b/src/structs.h
@@ -262,6 +262,8 @@ typedef struct
 #endif
     long	wo_scr;
 #define w_p_scr w_onebuf_opt.wo_scr	// 'scroll'
+    int		wo_sms;
+#define w_p_sms w_onebuf_opt.wo_sms	// 'smoothscroll'
 #ifdef FEAT_SPELL
     int		wo_spell;
 # define w_p_spell w_onebuf_opt.wo_spell // 'spell'
@@ -3592,11 +3594,12 @@ struct window_S
 				    // below w_topline (at end of file)
     int		w_old_botfill;	    // w_botfill at last redraw
 #endif
-    colnr_T	w_leftcol;	    // window column number of the left most
+    colnr_T	w_leftcol;	    // screen column number of the left most
 				    // character in the window; used when
 				    // 'wrap' is off
-    colnr_T	w_skipcol;	    // starting column when a single line
-				    // doesn't fit in the window
+    colnr_T	w_skipcol;	    // starting screen column for the first
+				    // line in the window; used when 'wrap' is
+				    // on
 
     int		w_empty_rows;	    // number of ~ rows in window
 #ifdef FEAT_DIFF