Skip to content

Commit

Permalink
Scroll to the bottom when creating a new prompt line
Browse files Browse the repository at this point in the history
  • Loading branch information
tbttfox authored and MHendricks committed Aug 20, 2024
1 parent 139f474 commit 359d666
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions preditor/gui/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,11 @@ def startPrompt(self, prompt):

self.insertPlainText(inputstr)

scroll = self.verticalScrollBar()
maximum = scroll.maximum()
if maximum is not None:
scroll.setValue(maximum)

def startOutputLine(self):
"""Create a new line to show output text."""
self.startPrompt(self._outputPrompt)
Expand Down

0 comments on commit 359d666

Please sign in to comment.