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

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

Fixes #24580

(cherry picked from commit ed1da3ac24)
This commit is contained in:
Jaehwang Jung
2023-08-12 17:17:10 +09:00
committed by github-actions[bot]
parent 211db74a31
commit 52669b5c69
2 changed files with 45 additions and 1 deletions

View File

@@ -2383,7 +2383,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 {