File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1919,13 +1919,8 @@ win_update(win_T *wp)
19191919 // Correct the first entry for filler lines at the top
19201920 // when it won't get updated below.
19211921 if (wp -> w_p_diff && bot_start > 0 )
1922- {
1923- int n = plines_win_nofill (wp , wp -> w_topline , FALSE)
1924- + wp -> w_topfill - adjust_plines_for_skipcol (wp );
1925- if (n > wp -> w_height )
1926- n = wp -> w_height ;
1927- wp -> w_lines [0 ].wl_size = n ;
1928- }
1922+ wp -> w_lines [0 ].wl_size = plines_correct_topline (wp ,
1923+ wp -> w_topline , TRUE);
19291924#endif
19301925 }
19311926 }
@@ -2342,21 +2337,7 @@ win_update(win_T *wp)
23422337 ++ new_rows ;
23432338 else
23442339#endif
2345- {
2346- #ifdef FEAT_DIFF
2347- if (l == wp -> w_topline )
2348- {
2349- int n = plines_win_nofill (wp , l , FALSE)
2350- + wp -> w_topfill ;
2351- n -= adjust_plines_for_skipcol (wp );
2352- if (n > wp -> w_height )
2353- n = wp -> w_height ;
2354- new_rows += n ;
2355- }
2356- else
2357- #endif
2358- new_rows += plines_win (wp , l , TRUE);
2359- }
2340+ new_rows += plines_correct_topline (wp , l , TRUE);
23602341 ++ j ;
23612342 if (new_rows > wp -> w_height - row - 2 )
23622343 {
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ static void botline_forw(lineoff_T *lp);
3939/*
4040 * Get the number of screen lines skipped with "wp->w_skipcol".
4141 */
42- int
42+ static int
4343adjust_plines_for_skipcol (win_T * wp )
4444{
4545 if (wp -> w_skipcol == 0 )
@@ -58,7 +58,7 @@ adjust_plines_for_skipcol(win_T *wp)
5858 * whether it is the first line, whether w_skipcol is non-zero and limiting to
5959 * the window height.
6060 */
61- static int
61+ int
6262plines_correct_topline (win_T * wp , linenr_T lnum , int limit_winheight )
6363{
6464 int n ;
Original file line number Diff line number Diff line change 11/* move.c */
2- int adjust_plines_for_skipcol (win_T * wp );
2+ int plines_correct_topline (win_T * wp , linenr_T lnum , int limit_winheight );
33void set_valid_virtcol (win_T * wp , colnr_T vcol );
44int sms_marker_overlap (win_T * wp , int extra2 );
55void update_topline_redraw (void );
Original file line number Diff line number Diff line change @@ -277,6 +277,7 @@ endfunc
277277
278278func Test_smoothscroll_diff_mode ()
279279 CheckScreendump
280+ CheckFeature diff
280281
281282 let lines = << trim END
282283 vim9script
@@ -303,6 +304,7 @@ endfunc
303304
304305func Test_smoothscroll_diff_change_line_default ()
305306 CheckScreendump
307+ CheckFeature diff
306308
307309 " Uses the new diffopt default with indent-heuristic and inline:char
308310 let lines = << trim END
@@ -334,6 +336,7 @@ endfunc
334336
335337func Test_smoothscroll_diff_change_line ()
336338 CheckScreendump
339+ CheckFeature diff
337340
338341 " Uses the old diffopt default
339342 let lines = << trim END
Original file line number Diff line number Diff line change @@ -729,6 +729,8 @@ static char *(features[]) =
729729
730730static int included_patches [] =
731731{ /* Add new patch number below this line */
732+ /**/
733+ 1883 ,
732734/**/
733735 1882 ,
734736/**/
You can’t perform that action at this time.
0 commit comments