From 590afbd4bcc8c9e3f04dd46d7747959290e71f51 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Wed, 26 Dec 2012 01:50:11 +0100 Subject: Fix /correct and /me highlights, and handle /correct a bit better. --- src/tabs.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/tabs.py') diff --git a/src/tabs.py b/src/tabs.py index 037d591f..d9dae765 100644 --- a/src/tabs.py +++ b/src/tabs.py @@ -590,11 +590,6 @@ class ChatTab(Tab): def completion_correct(self, the_input): return the_input.auto_completion([self.last_sent_message['body']], '', quotify=False) - def modify_message(self, txt, old_id, new_id): - self._text_buffer.modify_message(txt, old_id, new_id) - self.text_win.rebuild_everything(self._text_buffer) - self.core.refresh_window() - @property def inactive(self): """Whether we should send inactive or active as a chatstate""" @@ -1641,6 +1636,14 @@ class MucTab(ChatTab): self._text_buffer.add_message(txt, time, nickname, nick_color, history, user, highlight=highlight, identifier=identifier) return highlight + def modify_message(self, txt, old_id, new_id, time=None, nickname=None): + self.log_message(txt, time, nickname) + highlight = self.do_highlight(txt, time, nickname) + self._text_buffer.modify_message(txt, old_id, new_id, highlight=highlight, time=time) + self.text_win.rebuild_everything(self._text_buffer) + self.core.refresh_window() + return highlight + def matching_names(self): return [safeJID(self.get_name()).user] -- cgit v1.2.3