summaryrefslogtreecommitdiff
path: root/src/sign.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-01-09 21:01:59 +0100
committerBram Moolenaar <Bram@vim.org>2020-01-09 21:01:59 +0100
commitbf0acff012c2f75563c20241f1a5478534fe2c7a (patch)
tree36314cac21d86f36a268dba88028fe4a36f6bfd3 /src/sign.c
parent4ba64418187995c96fc29e4e4f699cecd57013bd (diff)
downloadvim-git-bf0acff012c2f75563c20241f1a5478534fe2c7a.tar.gz
patch 8.2.0108: when sign text is changed a manual redraw is neededv8.2.0108
Problem: When sign text is changed a manual redraw is needed. (Pontus Lietzler) Solution: Redraw automatically. (closes #5455)
Diffstat (limited to 'src/sign.c')
-rw-r--r--src/sign.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/sign.c b/src/sign.c
index 935ec3c74..9d8d7ac8a 100644
--- a/src/sign.c
+++ b/src/sign.c
@@ -1025,6 +1025,16 @@ sign_define_by_name(
else
sp_prev->sn_next = sp;
}
+ else
+ {
+ win_T *wp;
+
+ // Signs may already exist, a redraw is needed in windows with a
+ // non-empty sign list.
+ FOR_ALL_WINDOWS(wp)
+ if (wp->w_buffer->b_signlist != NULL)
+ redraw_buf_later(wp->w_buffer, NOT_VALID);
+ }
// set values for a defined sign.
if (icon != NULL)
@@ -1781,10 +1791,8 @@ sign_get_placed(
else
{
FOR_ALL_BUFFERS(buf)
- {
if (buf->b_signlist != NULL)
sign_get_placed_in_buf(buf, 0, sign_id, sign_group, retlist);
- }
}
}