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.
This commit is contained in:
Markus Böhme 2017-01-25 10:23:38 +01:00
parent 18df7163d1
commit 2e026335de
1 changed files with 1 additions and 3 deletions

View File

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