Hi Bram,
here is an updated patch, that also contains documentation.

regards,
Christian

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt
--- a/runtime/doc/sign.txt
+++ b/runtime/doc/sign.txt
@@ -161,6 +161,12 @@
 :sign unplace *
 		Remove all placed signs.
 
+:sign unplace * file={fname}
+		Remove all placed signs in file {fname}.
+
+:sign unplace * buffer={nr}
+		Same, but use buffer {nr}.
+
 :sign unplace
 		Remove the placed sign at the cursor position.
 
diff --git a/src/buffer.c b/src/buffer.c
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -57,7 +57,7 @@
 
 #if defined(FEAT_SIGNS)
 static void insert_sign __ARGS((buf_T *buf, signlist_T *prev, signlist_T *next, int id, linenr_T lnum, int typenr));
-static void buf_delete_signs __ARGS((buf_T *buf));
+void buf_delete_signs __ARGS((buf_T *buf));
 #endif
 
 #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
@@ -5433,7 +5433,7 @@
 /*
  * Delete signs in buffer "buf".
  */
-    static void
+    void
 buf_delete_signs(buf)
     buf_T	*buf;
 {
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -6887,6 +6887,11 @@
 		lnum = atoi((char *)arg);
 		arg = skiptowhite(arg);
 	    }
+	    else if (STRNCMP(arg, "*", 1) == 0 && idx == SIGNCMD_UNPLACE)
+	    {
+	        arg++;
+		arg = skiptowhite(arg);
+	    }
 	    else if (STRNCMP(arg, "name=", 5) == 0)
 	    {
 		arg += 5;
@@ -6923,7 +6928,7 @@
 	{
 	    EMSG2(_("E158: Invalid buffer name: %s"), arg);
 	}
-	else if (id <= 0)
+	else if (id <= 0 && idx != SIGNCMD_UNPLACE)
 	{
 	    if (lnum >= 0 || sign_name != NULL)
 		EMSG(_(e_invarg));
@@ -6931,6 +6936,11 @@
 		/* ":sign place file={fname}": list placed signs in one file */
 		sign_list_placed(buf);
 	}
+	else if (idx == SIGNCMD_UNPLACE)
+	{
+	    redraw_buf_later(buf, NOT_VALID);
+	    buf_delete_signs(buf);
+	}
 	else if (idx == SIGNCMD_JUMP)
 	{
 	    /* ":sign jump {id} file={fname}" */
diff --git a/src/proto/buffer.pro b/src/proto/buffer.pro
--- a/src/proto/buffer.pro
+++ b/src/proto/buffer.pro
@@ -66,4 +66,7 @@
 void set_buflisted __ARGS((int on));
 int buf_contents_changed __ARGS((buf_T *buf));
 void wipe_buffer __ARGS((buf_T *buf, int aucmd));
+#if defined(FEAT_SIGNS)
+void buf_delete_signs __ARGS((buf_T *buf));
+#endif
 /* vim: set ft=c : */

Raspunde prin e-mail lui