diff options
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index a17b40cb68..01e820dd6e 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -6997,6 +6997,16 @@ ex_sign(eap) lnum = atoi((char *)arg); arg = skiptowhite(arg); } + else if (STRNCMP(arg, "*", 1) == 0 && idx == SIGNCMD_UNPLACE) + { + if (id != -1) + { + EMSG(_(e_invarg)); + return; + } + id = -2; + arg = skiptowhite(arg + 1); + } else if (STRNCMP(arg, "name=", 5) == 0) { arg += 5; @@ -7033,7 +7043,7 @@ ex_sign(eap) { EMSG2(_("E158: Invalid buffer name: %s"), arg); } - else if (id <= 0) + else if (id <= 0 && !(idx == SIGNCMD_UNPLACE && id == -2)) { if (lnum >= 0 || sign_name != NULL) EMSG(_(e_invarg)); @@ -7074,11 +7084,17 @@ ex_sign(eap) } else if (idx == SIGNCMD_UNPLACE) { - /* ":sign unplace {id} file={fname}" */ if (lnum >= 0 || sign_name != NULL) EMSG(_(e_invarg)); + else if (id == -2) + { + /* ":sign unplace * file={fname}" */ + redraw_buf_later(buf, NOT_VALID); + buf_delete_signs(buf); + } else { + /* ":sign unplace {id} file={fname}" */ lnum = buf_delsign(buf, id); update_debug_sign(buf, lnum); } |