aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/decoration.c12
-rw-r--r--src/nvim/drawscreen.c2
-rw-r--r--src/nvim/undo.c4
3 files changed, 10 insertions, 8 deletions
diff --git a/src/nvim/decoration.c b/src/nvim/decoration.c
index ddc4708740..7cce6b3ad1 100644
--- a/src/nvim/decoration.c
+++ b/src/nvim/decoration.c
@@ -840,14 +840,14 @@ void buf_signcols_count_range(buf_T *buf, int row1, int row2, int add, TriState
// For each row increment "b_signcols.count" at the number of counted signs,
// and decrement at the previous number of signs. These two operations are
- // split in separate calls if "clear" is not kNone (surrounding a marktree splice).
+ // split in separate calls if "clear" is not kFalse (surrounding a marktree splice).
for (int i = 0; i < row2 + 1 - row1; i++) {
- int width = MIN(SIGN_SHOW_MAX, count[i] - add);
- if (clear != kNone && width > 0) {
- buf->b_signcols.count[width - 1]--;
- assert(buf->b_signcols.count[width - 1] >= 0);
+ int prevwidth = MIN(SIGN_SHOW_MAX, count[i] - add);
+ if (clear != kNone && prevwidth > 0) {
+ buf->b_signcols.count[prevwidth - 1]--;
+ assert(buf->b_signcols.count[prevwidth - 1] >= 0);
}
- width = MIN(SIGN_SHOW_MAX, count[i]);
+ int width = MIN(SIGN_SHOW_MAX, count[i]);
if (clear != kTrue && width > 0) {
buf->b_signcols.count[width - 1]++;
if (width > buf->b_signcols.max) {
diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c
index 8341989ab0..9a3fffde07 100644
--- a/src/nvim/drawscreen.c
+++ b/src/nvim/drawscreen.c
@@ -1206,7 +1206,7 @@ static bool win_redraw_signcols(win_T *wp)
if (!buf->b_signcols.autom
&& (*wp->w_p_stc != NUL || (wp->w_maxscwidth > 1 && wp->w_minscwidth != wp->w_maxscwidth))) {
buf->b_signcols.autom = true;
- buf_signcols_count_range(buf, 0, buf->b_ml.ml_line_count, MAXLNUM, kNone);
+ buf_signcols_count_range(buf, 0, buf->b_ml.ml_line_count, MAXLNUM, kFalse);
}
while (buf->b_signcols.max > 0 && buf->b_signcols.count[buf->b_signcols.max - 1] == 0) {
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index d343fb5fa0..d517f07b32 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -2389,7 +2389,9 @@ static void u_undoredo(bool undo, bool do_buf_event)
// When text has been changed, 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) && bot <= curbuf->b_ml.ml_line_count) {
+ // Also just in case the line had a sign which needs to be removed.
+ if ((spell_check_window(curwin) || curbuf->b_signs_with_text)
+ && bot <= curbuf->b_ml.ml_line_count) {
redrawWinline(curwin, bot);
}