Skip to content

Commit 7e6ec9b

Browse files
committedSep 22, 2012
cleaning and minor adjustments to the code for console
1 parent 73fcb66 commit 7e6ec9b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed
 

‎python/console_sci.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ def clearConsole(self):
124124
self.setFocus()
125125

126126
def commandConsole(self, command):
127+
if not self.is_cursor_on_last_line():
128+
self.move_cursor_to_end()
127129
line, pos = self.getCurLine()
128130
selCmd= self.text(line).length()
129131
self.setSelection(line, 4, line, selCmd)
@@ -405,13 +407,6 @@ def keyPressEvent(self, e):
405407
self.SendScintilla(QsciScintilla.SCI_WORDRIGHT)
406408
else:
407409
self.SendScintilla(QsciScintilla.SCI_CHARRIGHT)
408-
elif e.key() == Qt.Key_Delete:
409-
if self.hasSelectedText():
410-
self.check_selection()
411-
self.removeSelectedText()
412-
elif self.is_cursor_on_last_line():
413-
self.SendScintilla(QsciScintilla.SCI_CLEAR)
414-
event.accept()
415410
## TODO: press event for auto-completion file directory
416411
#elif e.key() == Qt.Key_Tab:
417412
#self.show_file_completion()

0 commit comments

Comments
 (0)
Please sign in to comment.