don't mix TextTag and tag names in buffer.insert_with_tags. Fixes #5581

This commit is contained in:
Yann Leboulanger 2010-01-29 21:59:13 +01:00
parent 841e3401d3
commit 4fe50e9466
1 changed files with 4 additions and 1 deletions

View File

@ -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()