Daniel Brötzmann pushed to branch master at gajim / gajim

Commits:

2 changed files:

Changes:

  • gajim/gtk/controls/base.py
    ... ... @@ -1333,6 +1333,7 @@ def set_control_active(self, state: bool) -> None:
    1333 1333
                     self.contact, Chatstate.INACTIVE)
    
    1334 1334
     
    
    1335 1335
         def reset_view(self) -> None:
    
    1336
    +        self._initial_fetch_finished = False
    
    1336 1337
             self.conversation_view.clear()
    
    1337 1338
     
    
    1338 1339
         def get_autoscroll(self) -> bool:
    

  • gajim/gtk/message_input.py
    ... ... @@ -101,11 +101,17 @@ def _on_focus_out(self, _widget, _event):
    101 101
                 self.toggle_speller(False)
    
    102 102
             return False
    
    103 103
     
    
    104
    -    def _on_text_changed(self, buffer_):
    
    104
    +    def _clear_tags(self) -> None:
    
    105
    +        _buffer = self.get_buffer()
    
    106
    +        start, end = _buffer.get_bounds()
    
    107
    +        _buffer.remove_all_tags(start, end)
    
    108
    +
    
    109
    +    def _on_text_changed(self, buffer_: Gtk.TextBuffer) -> None:
    
    105 110
             text = self.get_text()
    
    106 111
             if not text:
    
    107 112
                 return
    
    108 113
     
    
    114
    +        self._clear_tags()
    
    109 115
             result = process(text)
    
    110 116
             for block in result.blocks:
    
    111 117
                 if block.name == 'plain':