Skip to content

Commit bbdc906

Browse files
committedJun 3, 2020
[python console] Additional tweaks to new prompt
1 parent 2a25c18 commit bbdc906

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎python/console/console_sci.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ def __init__(self, parent=None):
9494
self.setMarginsFont(font)
9595
self.setMarginWidth(1, "00000")
9696
self.setMarginType(1, 5)
97+
self.setCaretLineVisible(False)
9798

9899
self.buffer = []
99100

@@ -179,8 +180,7 @@ def refreshSettingsShell(self):
179180
QColor(self.MATCHED_BRACE_BACKGROUND_COLOR))))
180181
self.setMatchedBraceForegroundColor(QColor(self.settings.value("pythonConsole/matchedBraceForegroundColor",
181182
QColor(self.MATCHED_BRACE_FOREGROUND_COLOR))))
182-
self.setMarginsBackgroundColor(
183-
QColor(self.settings.value("pythonConsole/marginBackgroundColor", QColor(self.MARGIN_BACKGROUND_COLOR))))
183+
self.setMarginsBackgroundColor(QColor(self.settings.value("pythonConsole/paperBackgroundColor", QColor(self.BACKGROUND_COLOR))))
184184

185185
# Sets minimum height for input area based of font metric
186186
self._setMinimumHeight()
@@ -314,13 +314,15 @@ def move_cursor_to_start(self):
314314
self.setCursorPosition(0, 0)
315315
self.ensureCursorVisible()
316316
self.ensureLineVisible(0)
317+
self.displayPrompt(False)
317318

318319
def move_cursor_to_end(self):
319320
"""Move cursor to end of text"""
320321
line, index = self.get_end_pos()
321322
self.setCursorPosition(line, index)
322323
self.ensureCursorVisible()
323324
self.ensureLineVisible(line)
325+
self.displayPrompt(False)
324326

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

0 commit comments

Comments
 (0)
Please sign in to comment.