0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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

@@ -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