From c11725ad33ad61b8574d78181992549332269fc8 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Sat, 29 Apr 2006 01:00:13 -0500 Subject: [PATCH] last_tag thing not needed anymore? --- moo/mooedit/moohighlighter.c | 27 --------------------------- moo/mooedit/moohighlighter.h | 3 --- 2 files changed, 30 deletions(-) diff --git a/moo/mooedit/moohighlighter.c b/moo/mooedit/moohighlighter.c index 44fcb91f..eabc2423 100644 --- a/moo/mooedit/moohighlighter.c +++ b/moo/mooedit/moohighlighter.c @@ -203,31 +203,11 @@ apply_tag (MooHighlighter *hl, _moo_line_buffer_get_line_index (hl->line_buf, line)); #endif 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); } } -// #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* _moo_highlighter_new (GtkTextBuffer *buffer, LineBuffer *line_buf, @@ -242,9 +222,6 @@ _moo_highlighter_new (GtkTextBuffer *buffer, hl->buffer = buffer; hl->line_buf = line_buf; -// if (gtk_check_version (2, 8, 0)) - hl->need_last_tag = TRUE; - return hl; } @@ -536,7 +513,6 @@ hl_compute_range (MooHighlighter *hl, g_return_val_if_fail (node != NULL, TRUE); - hl->last_tag = NULL; 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); @@ -721,7 +697,6 @@ _moo_highlighter_apply_tags (MooHighlighter *hl, _moo_highlighter_queue_compute (hl); first_changed = last_changed = -1; - hl->last_tag = NULL; 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) _moo_text_buffer_tags_changed (MOO_TEXT_BUFFER (hl->buffer), first_changed, last_changed); diff --git a/moo/mooedit/moohighlighter.h b/moo/mooedit/moohighlighter.h index 7c569623..778d45ef 100644 --- a/moo/mooedit/moohighlighter.h +++ b/moo/mooedit/moohighlighter.h @@ -57,9 +57,6 @@ struct _MooHighlighter { CtxNode *root; GSList *nodes; guint idle; - - gboolean need_last_tag; - GtkTextTag *last_tag; }; struct _MooSyntaxTag {