last_tag thing not needed anymore?

master
Yevgen Muntyan 2006-04-29 01:00:13 -05:00
parent 465028bf6d
commit c11725ad33
2 changed files with 0 additions and 30 deletions

View File

@ -203,31 +203,11 @@ apply_tag (MooHighlighter *hl,
_moo_line_buffer_get_line_index (hl->line_buf, line)); _moo_line_buffer_get_line_index (hl->line_buf, line));
#endif #endif
line->hl_info->tags = g_slist_prepend (line->hl_info->tags, g_object_ref (tag)); line->hl_info->tags = g_slist_prepend (line->hl_info->tags, g_object_ref (tag));
hl->last_tag = tag;
_moo_text_buffer_apply_syntax_tag (MOO_TEXT_BUFFER (hl->buffer), tag, start, end); _moo_text_buffer_apply_syntax_tag (MOO_TEXT_BUFFER (hl->buffer), tag, start, end);
} }
} }
// #if !GTK_CHECK_VERSION(2,8,0)
// apparently http://bugzilla.gnome.org/show_bug.cgi?id=143537 is not completely fixed yet
static void
check_last_tag (MooHighlighter *hl)
{
if (hl->last_tag && hl->need_last_tag)
{
gboolean fg_set;
g_object_get (hl->last_tag, "foreground-set", &fg_set, NULL);
g_object_set (hl->last_tag, "foreground-set", fg_set, NULL);
}
hl->last_tag = NULL;
}
// #else
// #define check_last_tag(hl)
// #endif
MooHighlighter* MooHighlighter*
_moo_highlighter_new (GtkTextBuffer *buffer, _moo_highlighter_new (GtkTextBuffer *buffer,
LineBuffer *line_buf, LineBuffer *line_buf,
@ -242,9 +222,6 @@ _moo_highlighter_new (GtkTextBuffer *buffer,
hl->buffer = buffer; hl->buffer = buffer;
hl->line_buf = line_buf; hl->line_buf = line_buf;
// if (gtk_check_version (2, 8, 0))
hl->need_last_tag = TRUE;
return hl; return hl;
} }
@ -536,7 +513,6 @@ hl_compute_range (MooHighlighter *hl,
g_return_val_if_fail (node != NULL, TRUE); g_return_val_if_fail (node != NULL, TRUE);
hl->last_tag = NULL;
gtk_text_buffer_get_iter_at_line (hl->buffer, &iter, lines->first); gtk_text_buffer_get_iter_at_line (hl->buffer, &iter, lines->first);
// g_print ("hl_compute_range: %d to %d\n", lines->first, lines->last); // g_print ("hl_compute_range: %d to %d\n", lines->first, lines->last);
@ -721,7 +697,6 @@ _moo_highlighter_apply_tags (MooHighlighter *hl,
_moo_highlighter_queue_compute (hl); _moo_highlighter_queue_compute (hl);
first_changed = last_changed = -1; first_changed = last_changed = -1;
hl->last_tag = NULL;
for (line_no = first_line; line_no <= last_line; ++line_no) for (line_no = first_line; line_no <= last_line; ++line_no)
{ {
@ -782,8 +757,6 @@ _moo_highlighter_apply_tags (MooHighlighter *hl,
} }
} }
// check_last_tag (hl);
if (first_changed >= 0) if (first_changed >= 0)
_moo_text_buffer_tags_changed (MOO_TEXT_BUFFER (hl->buffer), _moo_text_buffer_tags_changed (MOO_TEXT_BUFFER (hl->buffer),
first_changed, last_changed); first_changed, last_changed);

View File

@ -57,9 +57,6 @@ struct _MooHighlighter {
CtxNode *root; CtxNode *root;
GSList *nodes; GSList *nodes;
guint idle; guint idle;
gboolean need_last_tag;
GtkTextTag *last_tag;
}; };
struct _MooSyntaxTag { struct _MooSyntaxTag {