comparison src/drawscreen.c @ 32493:0632606a2530 v9.0.1578

patch 9.0.1578: SpellCap highlight not always updated when needed Commit: https://github.com/vim/vim/commit/2ac6497f0ef186f0e3ba67d7f0a485bfb612bb08 Author: Luuk van Baal <luukvbaal@gmail.com> Date: Thu May 25 17:14:42 2023 +0100 patch 9.0.1578: SpellCap highlight not always updated when needed Problem: SpellCap highlight not always updated when needed. Solution: Handle updating line below closed fold and other situations where only part of the window is redrawn. (Luuk van Baal, closes #12428, closes #12420)
author Bram Moolenaar <Bram@vim.org>
date Thu, 25 May 2023 18:15:04 +0200
parents 9ac987a467d5
children 2614026cd259
comparison
equal deleted inserted replaced
32492:8064be0111ef 32493:0632606a2530
2485 && syntax_present(wp)) 2485 && syntax_present(wp))
2486 syntax_end_parsing(wp, syntax_last_parsed + 1); 2486 syntax_end_parsing(wp, syntax_last_parsed + 1);
2487 #endif 2487 #endif
2488 2488
2489 // Display one line. 2489 // Display one line.
2490 row = win_line(wp, lnum, srow, wp->w_height, 2490 row = win_line(wp, lnum, srow, wp->w_height, mod_top, FALSE);
2491 mod_top == 0, FALSE);
2492 2491
2493 #ifdef FEAT_FOLDING 2492 #ifdef FEAT_FOLDING
2494 wp->w_lines[idx].wl_folded = FALSE; 2493 wp->w_lines[idx].wl_folded = FALSE;
2495 wp->w_lines[idx].wl_lastlnum = lnum; 2494 wp->w_lines[idx].wl_lastlnum = lnum;
2496 #endif 2495 #endif
2533 fold_count = foldedCount(wp, lnum, &win_foldinfo); 2532 fold_count = foldedCount(wp, lnum, &win_foldinfo);
2534 if (fold_count != 0) 2533 if (fold_count != 0)
2535 fold_line(wp, fold_count, &win_foldinfo, lnum, row); 2534 fold_line(wp, fold_count, &win_foldinfo, lnum, row);
2536 else 2535 else
2537 #endif 2536 #endif
2538 (void)win_line(wp, lnum, srow, wp->w_height, TRUE, TRUE); 2537 (void)win_line(wp, lnum, srow, wp->w_height, mod_top, TRUE);
2539 } 2538 }
2540 2539
2541 // This line does not need to be drawn, advance to the next one. 2540 // This line does not need to be drawn, advance to the next one.
2542 row += wp->w_lines[idx++].wl_size; 2541 row += wp->w_lines[idx++].wl_size;
2543 if (row > wp->w_height) // past end of screen 2542 if (row > wp->w_height) // past end of screen