Improve multiline cursor behavior in Python console and expression editor

Now supports multi-line inserts and pastes
This commit is contained in:
Nyall Dawson 2018-12-17 17:45:00 +10:00
parent e9e1e0d6f3
commit dab069e1ea
2 changed files with 6 additions and 0 deletions

View File

@ -146,6 +146,9 @@ class Editor(QsciScintilla):
self.setEdgeMode(QsciScintilla.EdgeLine)
self.setEdgeColumn(80)
self.SendScintilla(self.SCI_SETADDITIONALSELECTIONTYPING, 1)
self.SendScintilla(self.SCI_SETMULTIPASTE, 1)
# self.setWrapMode(QsciScintilla.WrapCharacter)
self.setWhitespaceVisibility(QsciScintilla.WsVisibleAfterIndent)
# self.SendScintilla(QsciScintilla.SCI_SETHSCROLLBAR, 0)

View File

@ -38,6 +38,9 @@ QgsCodeEditor::QgsCodeEditor( QWidget *parent, const QString &title, bool foldin
}
setSciWidget();
setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded );
SendScintilla( SCI_SETADDITIONALSELECTIONTYPING, 1 );
SendScintilla( SCI_SETMULTIPASTE, 1 );
}
// Workaround a bug in QScintilla 2.8.X