0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 9.0.0652: 'smoothscroll' not tested with 'number' and "n" in 'cpo'

Problem:    'smoothscroll' not tested with 'number' and "n" in 'cpo'.
Solution:   Add tests, fix uncovered problem.
This commit is contained in:
Bram Moolenaar
2022-10-03 20:01:16 +01:00
parent f269eabc6c
commit b6aab8f44b
11 changed files with 133 additions and 3 deletions

View File

@@ -1552,6 +1552,26 @@ win_update(win_T *wp)
init_search_hl(wp, &screen_search_hl);
#endif
// Make sure skipcol is valid, it depends on various options and the window
// width.
if (wp->w_skipcol > 0)
{
int w = 0;
int width1 = wp->w_width - win_col_off(wp);
int width2 = width1 + win_col_off2(wp);
int add = width1;
while (w < wp->w_skipcol)
{
if (w > 0)
add = width2;
w += add;
}
if (w != wp->w_skipcol)
// always round down, the higher value may not be valid
wp->w_skipcol = w - add;
}
#ifdef FEAT_LINEBREAK
// Force redraw when width of 'number' or 'relativenumber' column
// changes.