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 committed Aug 20, 2024
1 parent 63fb0bb commit cd3d6f2
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 @@ -758,6 +758,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 cd3d6f2

Please sign in to comment.