Fixed styles
parent
8690b73c82
commit
f82e5b8c33
|
@ -259,11 +259,7 @@ create_tag (MooHighlighter *hl,
|
|||
gtk_text_tag_set_priority (cbt, gtk_text_tag_table_get_size (table) - 1);
|
||||
#endif
|
||||
|
||||
_moo_lang_set_tag_style (rule ? rule->context->lang : ctx_node->ctx->lang,
|
||||
tag,
|
||||
// rule ? rule->context : ctx_node->ctx,
|
||||
ctx_node->ctx,
|
||||
rule, NULL);
|
||||
_moo_lang_set_tag_style (tag, ctx_node->ctx, rule, NULL);
|
||||
ctx_node->child_tags = g_slist_prepend (ctx_node->child_tags, tag);
|
||||
|
||||
return tag;
|
||||
|
@ -791,9 +787,7 @@ tag_set_scheme (G_GNUC_UNUSED gpointer whatever,
|
|||
if (tag)
|
||||
{
|
||||
_moo_lang_erase_tag_style (GTK_TEXT_TAG (tag));
|
||||
_moo_lang_set_tag_style (tag->rule ? tag->rule->context->lang : tag->ctx_node->ctx->lang,
|
||||
GTK_TEXT_TAG (tag),
|
||||
// tag->rule ? tag->rule->context : tag->ctx_node->ctx,
|
||||
_moo_lang_set_tag_style (GTK_TEXT_TAG (tag),
|
||||
tag->ctx_node->ctx,
|
||||
tag->rule, scheme);
|
||||
}
|
||||
|
|
|
@ -244,8 +244,7 @@ void _moo_lang_add_style (MooLang *lang,
|
|||
void _moo_lang_free (MooLang *lang);
|
||||
|
||||
void _moo_lang_scheme_changed (MooLang *lang);
|
||||
void _moo_lang_set_tag_style (MooLang *lang,
|
||||
GtkTextTag *tag,
|
||||
void _moo_lang_set_tag_style (GtkTextTag *tag,
|
||||
MooContext *ctx,
|
||||
MooRule *rule,
|
||||
MooTextStyleScheme *scheme);
|
||||
|
|
|
@ -459,20 +459,18 @@ set_tag_style (MooLang *lang,
|
|||
|
||||
|
||||
void
|
||||
_moo_lang_set_tag_style (MooLang *lang,
|
||||
GtkTextTag *tag,
|
||||
_moo_lang_set_tag_style (GtkTextTag *tag,
|
||||
MooContext *ctx,
|
||||
MooRule *rule,
|
||||
MooTextStyleScheme *scheme)
|
||||
{
|
||||
g_return_if_fail (lang != NULL && GTK_IS_TEXT_TAG (tag));
|
||||
g_return_if_fail (ctx != NULL && ctx->lang == lang);
|
||||
// g_return_if_fail (!rule || rule->context == ctx);
|
||||
g_return_if_fail (GTK_IS_TEXT_TAG (tag));
|
||||
g_return_if_fail (ctx != NULL);
|
||||
|
||||
set_tag_style (lang, tag, ctx->style, scheme);
|
||||
set_tag_style (ctx->lang, tag, ctx->style, scheme);
|
||||
|
||||
if (rule)
|
||||
set_tag_style (lang, tag, rule->style, scheme);
|
||||
set_tag_style (rule->context->lang, tag, rule->style, scheme);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue