summaryrefslogtreecommitdiffstats
path: root/src/change.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-09-27 16:29:38 +0100
committerBram Moolenaar <Bram@vim.org>2022-09-27 16:29:38 +0100
commit26f09ea54b2c60abf21df42c60bdfc60eca17b0d (patch)
tree4a6ac8239dfc73b25d28dd410211387f464da7f8 /src/change.c
parentf802767df7b4532651fcf11d49e812ead32db45b (diff)
patch 9.0.0608: with spelling, deleting a full stop does not update next linev9.0.0608
Problem: With spell checking, deleting a full stop at the end of a line does not update SpellCap at the start of the next line. Solution: Update the next line when characters have been deleted. Also when using undo.
Diffstat (limited to 'src/change.c')
-rw-r--r--src/change.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/change.c b/src/change.c
index 038f3c199f..67b70230a1 100644
--- a/src/change.c
+++ b/src/change.c
@@ -709,6 +709,13 @@ changed_bytes(linenr_T lnum, colnr_T col)
changedOneline(curbuf, lnum);
changed_common(lnum, col, lnum + 1, 0L);
+#ifdef FEAT_SPELL
+ // When text has been changed at the end of the line, possibly the start of
+ // the next line may have SpellCap that should be removed or it needs to be
+ // displayed. Schedule the next line for redrawing just in case.
+ if (spell_check_window(curwin) && lnum < curbuf->b_ml.ml_line_count)
+ redrawWinline(curwin, lnum + 1);
+#endif
#ifdef FEAT_DIFF
// Diff highlighting in other diff windows may need to be updated too.
if (curwin->w_p_diff)