Bram,
consider this example:
:sign define foobar
:sign place 1 name=foobar buffer=1
Note: No error message about missing line number. This might be okay,
since in this case Vim will try to change that particular sign, except
here, it can't change the sign because it isn't placed yet.
I think, an error message might be useful in this case, because if the
user actually tried to place a sign (and hence forgot about the
linenumber) he might be wondering why nothing has happened.
Please note the todo item in the patch.
Best,
Christian
--
Die Herrlichkeit der Welt ist immer adäquat der Herrlichkeit dessen,
der sie betrachtet. Der Gute findet hier sein Paradies
-- Heinrich Heine
--
--
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
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -7275,7 +7275,15 @@ ex_sign(eap)
else
/* ":sign place {id} file={fname}": change sign type */
lnum = buf_change_sign_type(buf, id, sp->sn_typenr);
- update_debug_sign(buf, lnum);
+ if (lnum > 0)
+ update_debug_sign(buf, lnum);
+ else
+ {
+ /* TODO: Add a proper error code, add the error code to
+ * sign.txt (:sign place {id} name={name} file={fname} */
+ EMSG2(_("EXXX: Not possible to change sign: %s"), sign_name);
+ return;
+ }
}
else
EMSG(_(e_invarg));