aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/change.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-05-25 18:01:06 +0800
committerGitHub <noreply@github.com>2023-05-25 18:01:06 +0800
commitaa9d46b6724cf3454aca602e64350856827c3ab8 (patch)
tree1c95080c85ac0df1b6930aa82f8aeb9476ff7583 /src/nvim/change.c
parentebb10d624825468c1f75bd14725cce500974b673 (diff)
parent50efdd6ccf1891392c048b92da5e5d123a30ff26 (diff)
downloadrneovim-aa9d46b6724cf3454aca602e64350856827c3ab8.tar.gz
rneovim-aa9d46b6724cf3454aca602e64350856827c3ab8.tar.bz2
rneovim-aa9d46b6724cf3454aca602e64350856827c3ab8.zip
Merge pull request #23744 from luukvbaal/spell
vim-patch:9.0.{0175,0590,0608,0664}
Diffstat (limited to 'src/nvim/change.c')
-rw-r--r--src/nvim/change.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/change.c b/src/nvim/change.c
index f4969d0ca9..9e1767c2f3 100644
--- a/src/nvim/change.c
+++ b/src/nvim/change.c
@@ -43,6 +43,7 @@
#include "nvim/plines.h"
#include "nvim/pos.h"
#include "nvim/search.h"
+#include "nvim/spell.h"
#include "nvim/state.h"
#include "nvim/strings.h"
#include "nvim/textformat.h"
@@ -393,6 +394,15 @@ void changed_bytes(linenr_T lnum, colnr_T col)
{
changedOneline(curbuf, lnum);
changed_common(lnum, col, lnum + 1, 0);
+ // 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.
+ // Don't do this when displaying '$' at the end of changed text.
+ if (spell_check_window(curwin)
+ && lnum < curbuf->b_ml.ml_line_count
+ && vim_strchr(p_cpo, CPO_DOLLAR) == NULL) {
+ redrawWinline(curwin, lnum + 1);
+ }
// notify any channels that are watching
buf_updates_send_changes(curbuf, lnum, 1, 1);