Skip to content

Commit

Permalink
fix: don't update the insertion point in stream mode
Browse files Browse the repository at this point in the history
  • Loading branch information
clementb49 committed Feb 18, 2025
1 parent 016d838 commit 6f29346
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion basilisk/gui/history_msg_text_ctrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ def flush_stream_buffer(self):
This method ensures that the buffered text is appended to the text control and also sent to the accessible output handler for screen readers.
"""
pos = self.GetInsertionPoint()
text = self.stream_buffer
if (
self._speak_stream
Expand All @@ -585,8 +586,8 @@ def flush_stream_buffer(self):
):
self.handle_speech_stream_buffer(new_text=text)
self.AppendText(text)
self.SetInsertionPoint(pos)
self.stream_buffer = ""
self.SetInsertionPoint(self.GetLastPosition())

def append_stream_chunk(self, text: str):
"""Append a chunk of text to the speech stream buffer.
Expand Down

0 comments on commit 6f29346

Please sign in to comment.