Skip to content
Permalink
Browse files

[python console] Additional tweaks to new prompt

  • Loading branch information
nirvn committed Jun 3, 2020
1 parent 2a25c18 commit bbdc9068b071fe5c5eca7543c9dc40b5ca3c88a1
Showing with 4 additions and 2 deletions.
  1. +4 −2 python/console/console_sci.py
@@ -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 = []

@@ -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()
@@ -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"""

0 comments on commit bbdc906

Please sign in to comment.
You can’t perform that action at this time.