fix(diff): filler lines for hunks bigger than linematch limit (#24676)

Apply linematch filler computation only if the hunk is actually
linematched.

Fixes #24580
This commit is contained in:
Jaehwang Jung
2023-08-12 18:14:37 +09:00
committed by GitHub
parent 04aed08157
commit 5a25dcc5a4
2 changed files with 45 additions and 1 deletions

View File

@@ -2384,7 +2384,7 @@ void diff_set_topline(win_T *fromwin, win_T *towin)
towin->w_topline = lnum + (dp->df_lnum[toidx] - dp->df_lnum[fromidx]);
if (lnum >= dp->df_lnum[fromidx]) {
if (diff_flags & DIFF_LINEMATCH) {
if (dp->is_linematched) {
calculate_topfill_and_topline(fromidx, toidx, fromwin->w_topline,
fromwin->w_topfill, &towin->w_topfill, &towin->w_topline);
} else {