From 2e026335de194ce4a7a4c36fc6f8c2f8b0013ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20B=C3=B6hme?= Date: Wed, 25 Jan 2017 10:23:38 +0100 Subject: [PATCH] Simplify appending new line in history window ConversationTextview provides an abstraction for adding text with tags. Use it instead of directly accessing its backing text buffer. --- src/history_window.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/history_window.py b/src/history_window.py index 659c73f32..df37a787f 100644 --- a/src/history_window.py +++ b/src/history_window.py @@ -512,9 +512,7 @@ class HistoryWindow: else: self.history_textview.print_real_text(message, name=contact_name, xhtml=xhtml, additional_data=additional_data) - buffer_ = self.history_textview.tv.get_buffer() - eob = buffer_.get_end_iter() - buffer_.insert_with_tags_by_name(eob, '\n', 'eol') + self.history_textview.print_real_text('\n', text_tags=['eol']) def on_search_entry_activate(self, widget): text = self.search_entry.get_text()