Skip to content
Permalink
Browse files

Improve multiline cursor behavior in Python console and expression ed…

…itor

Now supports multi-line inserts and pastes

(cherry picked from commit dab069e)
  • Loading branch information
nyalldawson committed Dec 20, 2018
1 parent 7116450 commit 452f04aedb89ddb80e04ed2062fe200abac5a2a9
Showing with 6 additions and 0 deletions.
  1. +3 −0 python/console/console_editor.py
  2. +3 −0 src/gui/qgscodeeditor.cpp
@@ -146,6 +146,9 @@ def __init__(self, parent=None):
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)
@@ -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

0 comments on commit 452f04a

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