Editor: Highlight automatically inserted text

Keep the highlight as long as the cursor is directly behind the closing
character and the editor is the focus widget.

Change-Id: Ic1d4bac263e9d2f395791dad7ecdceb9d69635c5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
David Schulz
2016-06-01 10:19:59 +02:00
committed by David Schulz
parent 6a2e9a1f06
commit 9bacb3e33e
7 changed files with 79 additions and 16 deletions

View File

@@ -301,6 +301,7 @@ public:
static Core::Id SnippetPlaceholderSelection;
static Core::Id CurrentLineSelection;
static Core::Id ParenthesesMatchingSelection;
static Core::Id AutoCompleteSelection;
static Core::Id CodeWarningsSelection;
static Core::Id CodeSemanticsSelection;
static Core::Id UndefinedSymbolSelection;
@@ -323,6 +324,9 @@ public:
enum Side { Left, Right };
void insertExtraToolBarWidget(Side side, QWidget *widget);
// keep the auto completion even if the focus is lost
void keepAutoCompletionHighlight(bool keepHighlight);
virtual void copy();
virtual void paste();
virtual void cut();