fix(events): triggered WinScrolled when only skipcol changed (#19972)

fix(events): trigger WinScrolled when only skipcol changed

vim-patch:9.0.0304: WinScrolled is not triggered when only skipcol changes

Problem:    WinScrolled is not triggered when only skipcol changes.
Solution:   Add w_last_skipcol and use it. (closes vim/vim#10998)
670ab0334b
This commit is contained in:
zeertzjq
2022-08-29 06:16:20 +08:00
committed by GitHub
parent b21980bd60
commit 1dcaa75a65
5 changed files with 52 additions and 1 deletions

View File

@@ -1240,9 +1240,10 @@ struct window_S {
colnr_T w_skipcol; // starting column when a single line
// doesn't fit in the window
// four fields that are only used when there is a WinScrolled autocommand
// five fields that are only used when there is a WinScrolled autocommand
linenr_T w_last_topline; ///< last known value for w_topline
colnr_T w_last_leftcol; ///< last known value for w_leftcol
colnr_T w_last_skipcol; ///< last known value for w_skipcol
int w_last_width; ///< last known value for w_width
int w_last_height; ///< last known value for w_height