Such dummy sign is useful to keep SignColumn shown everytime and prevent it's
collapsing on sign update. This solution will prevent "flickering" caused by
such collapsing.
When using `relativenumber` window redraw becomes very unstable when signs are
placed and unplaced, often cause whole window not only to redraw, but to clear
screen first, which ends up by constant screen flickering.
I've found that even placing invisible dummy sign (especially on line 1) will
cause entire window to clear, which I've found as unacceptable.
Proposed patch will prevent redrawing when sign without text or image was
placed.
However, I've found that using `relativenumber` cause to clearing whole screen
more often. Even in cases where clearing entire screen is not needed. It is
very reproducible using YouCompleteMe plugin (now it has not-so-great
workaround which eliminates _all_ signs in SignColumn). So, I think there must
be more clever way to determine when screen should be cleared when
`relativenumber` is used. I'm glad to help if I've got some clues about how to
do it and not break everything.
--
--
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 -r f9fa2e506b9f src/ex_cmds.c
--- a/src/ex_cmds.c Tue Jun 17 17:48:32 2014 +0200
+++ b/src/ex_cmds.c Fri Sep 19 02:02:03 2014 +0700
@@ -7291,9 +7291,15 @@
else
/* ":sign place {id} file={fname}": change sign type */
lnum = buf_change_sign_type(buf, id, sp->sn_typenr);
- if (lnum > 0)
- update_debug_sign(buf, lnum);
- else
+ if (lnum > 0) {
+ if (sp->sn_text != NULL && STRLEN(sp->sn_text) > 0
+#ifdef FEAT_SIGN_ICONS
+ || sp->sn_icon != NULL
+#endif
+ ) {
+ update_debug_sign(buf, lnum);
+ }
+ } else
EMSG2(_("E885: Not possible to change sign %s"), sign_name);
}
else