forked from AuroraMiddleware/gtk
inspector: Always underline at least one char
Empty underlines are hard to make out. Since we get somewhat unreliable section information from the CSS parser, we just make sure that we always underline at least one character.
This commit is contained in:
parent
ee1381a1f3
commit
036ee7a68b
@ -337,6 +337,9 @@ show_parsing_error (GtkCssProvider *provider,
|
|||||||
else
|
else
|
||||||
tag_name = "error";
|
tag_name = "error";
|
||||||
|
|
||||||
|
if (gtk_text_iter_equal (&css_error->start, &css_error->end))
|
||||||
|
gtk_text_iter_forward_char (&css_error->end);
|
||||||
|
|
||||||
gtk_text_buffer_apply_tag_by_name (buffer, tag_name, &css_error->start, &css_error->end);
|
gtk_text_buffer_apply_tag_by_name (buffer, tag_name, &css_error->start, &css_error->end);
|
||||||
|
|
||||||
ce->priv->errors = g_list_prepend (ce->priv->errors, css_error);
|
ce->priv->errors = g_list_prepend (ce->priv->errors, css_error);
|
||||||
|
Loading…
Reference in New Issue
Block a user