summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-01-14 23:08:18 +0100
committerBram Moolenaar <Bram@vim.org>2019-01-14 23:08:18 +0100
commit8144acbec33b751788a7912e2d880c083c6cfe93 (patch)
tree0d5ca1346397327e9b5a0b37a9a2f1a1a22da892
parent6acc79f5d4b9d5b02f4ab21ec885e68acc13a2e2 (diff)
downloadvim-git-8144acbec33b751788a7912e2d880c083c6cfe93.tar.gz
patch 8.1.0750: when the last sign is deleted the signcolumn may remainv8.1.0750
Problem: When the last sign is deleted the signcolumn may not be removed even though 'signcolumn' is "auto". Solution: When deleting the last sign redraw the buffer. (Dominique Pelle, closes #3803, closes #3804)
-rw-r--r--src/sign.c13
-rw-r--r--src/version.c2
2 files changed, 10 insertions, 5 deletions
diff --git a/src/sign.c b/src/sign.c
index af7771ead..734dd257e 100644
--- a/src/sign.c
+++ b/src/sign.c
@@ -374,8 +374,8 @@ buf_change_sign_type(
/*
* Return the type number of the sign at line number 'lnum' in buffer 'buf'
- * which has the attribute specifed by 'type'. Returns 0 if a sign is not found
- * at the line number or it doesn't have the specified attribute.
+ * which has the attribute specified by 'type'. Returns 0 if a sign is not
+ * found at the line number or it doesn't have the specified attribute.
*/
int
buf_getsigntype(
@@ -442,7 +442,7 @@ buf_delsign(
redraw_buf_line_later(buf, lnum);
// Check whether only one sign needs to be deleted
- // If deleting a sign with a specific identifer in a particular
+ // If deleting a sign with a specific identifier in a particular
// group or deleting any sign at a particular line number, delete
// only one sign.
if (group == NULL
@@ -455,9 +455,12 @@ buf_delsign(
}
// When deleting the last sign the cursor position may change, because the
- // sign columns no longer shows.
+ // sign columns no longer shows. And the 'signcolumn' may be hidden.
if (buf->b_signlist == NULL)
+ {
+ redraw_buf_later(buf, NOT_VALID);
changed_cline_bef_curs();
+ }
return lnum;
}
@@ -894,7 +897,7 @@ sign_list_by_name(char_u *name)
}
/*
- * Place a sign at the specifed file location or update a sign.
+ * Place a sign at the specified file location or update a sign.
*/
int
sign_place(
diff --git a/src/version.c b/src/version.c
index c0a91d393..b0f488657 100644
--- a/src/version.c
+++ b/src/version.c
@@ -796,6 +796,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 750,
+/**/
749,
/**/
748,