From 4fe50e94664d16928a74d43e1d0416f32c6870ea Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 29 Jan 2010 21:59:13 +0100 Subject: [PATCH] don't mix TextTag and tag names in buffer.insert_with_tags. Fixes #5581 --- src/conversation_textview.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/conversation_textview.py b/src/conversation_textview.py index 5b92b5934..c94602615 100644 --- a/src/conversation_textview.py +++ b/src/conversation_textview.py @@ -1158,7 +1158,10 @@ class ConversationTextview(gobject.GObject): all_tags = tags[:] if use_other_tags: all_tags += other_tags - buffer_.insert_with_tags_by_name(end_iter, special_text, *all_tags) + # convert all names to TextTag + ttt = buffer_.get_tag_table() + all_tags = [(ttt.lookup(t) if isinstance(t, str) else t) for t in all_tags] + buffer_.insert_with_tags(end_iter, special_text, *all_tags) def print_empty_line(self): buffer_ = self.tv.get_buffer()