From 15e616a057a2412add6bb7adc369a2d97e20356d Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Sun, 29 Nov 2020 14:26:59 +0100 Subject: folds: use Folded highlight even with spell on (#13393) the highlight was not used with spell enabled on folded lines. Thanks to lervag for the nice report. --- src/nvim/screen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 4373d6d5a8..2eeeebb88d 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -2550,7 +2550,9 @@ static int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, */ cur = wp->w_match_head; shl_flag = false; - while ((cur != NULL || !shl_flag) && !number_only) { + while ((cur != NULL || !shl_flag) && !number_only + && foldinfo.fi_lines == 0 + ) { if (!shl_flag) { shl = &search_hl; shl_flag = true; -- cgit