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.
This commit is contained in:
Matthieu Coudron
2020-11-29 14:26:59 +01:00
committed by GitHub
parent dc6593a84a
commit 15e616a057
2 changed files with 33 additions and 9 deletions

View File

@@ -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;