0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 9.1.1027: no sanitize check when running linematch

Problem:  no sanitize check when running linematch
Solution: add sanitize check before applying the linematch algorithm,
          similar to diff_find_change() (Jonathon)

closes: #16446

Signed-off-by: Jonathon <jonathonwhite@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Jonathon
2025-01-17 13:37:35 +01:00
committed by Christian Brabandt
parent 3a738fccaa
commit ca307efe48
4 changed files with 62 additions and 10 deletions

View File

@@ -2351,7 +2351,8 @@ diff_check_with_linestatus(win_T *wp, linenr_T lnum, int *linestatus)
// Don't run linematch when lnum is offscreen. Useful for scrollbind
// calculations which need to count all the filler lines above the screen.
if (lnum >= wp->w_topline && lnum < wp->w_botline
&& !dp->is_linematched && diff_linematch(dp))
&& !dp->is_linematched && diff_linematch(dp)
&& diff_check_sanity(curtab, dp))
run_linematch_algorithm(dp);
if (dp->is_linematched)