Skip to content

Commit

Permalink
[python console] Additional tweaks to new prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jun 3, 2020
1 parent 2a25c18 commit bbdc906
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/console/console_sci.py
Expand Up @@ -94,6 +94,7 @@ def __init__(self, parent=None):
self.setMarginsFont(font)
self.setMarginWidth(1, "00000")
self.setMarginType(1, 5)
self.setCaretLineVisible(False)

self.buffer = []

Expand Down Expand Up @@ -179,8 +180,7 @@ def refreshSettingsShell(self):
QColor(self.MATCHED_BRACE_BACKGROUND_COLOR))))
self.setMatchedBraceForegroundColor(QColor(self.settings.value("pythonConsole/matchedBraceForegroundColor",
QColor(self.MATCHED_BRACE_FOREGROUND_COLOR))))
self.setMarginsBackgroundColor(
QColor(self.settings.value("pythonConsole/marginBackgroundColor", QColor(self.MARGIN_BACKGROUND_COLOR))))
self.setMarginsBackgroundColor(QColor(self.settings.value("pythonConsole/paperBackgroundColor", QColor(self.BACKGROUND_COLOR))))

# Sets minimum height for input area based of font metric
self._setMinimumHeight()
Expand Down Expand Up @@ -314,13 +314,15 @@ def move_cursor_to_start(self):
self.setCursorPosition(0, 0)
self.ensureCursorVisible()
self.ensureLineVisible(0)
self.displayPrompt(False)

def move_cursor_to_end(self):
"""Move cursor to end of text"""
line, index = self.get_end_pos()
self.setCursorPosition(line, index)
self.ensureCursorVisible()
self.ensureLineVisible(line)
self.displayPrompt(False)

def is_cursor_on_last_line(self):
"""Return True if cursor is on the last line"""
Expand Down

0 comments on commit bbdc906

Please sign in to comment.