C++: Implement context-aware expand / shrink selection actions.

Implement selection expanding / shrinking, that is aware of C++
semantics, thus giving smart selection changing.

Change-Id: I1386a20597fa6bb85c3aa0d8ddfb87cdb3fd7c38
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Alexandru Croitor
2015-12-20 19:59:00 +01:00
committed by Nikolai Kosjar
parent 8bfdc82c5a
commit bed88818ce
21 changed files with 2650 additions and 14 deletions

View File

@@ -294,6 +294,7 @@ public:
const DisplaySettings &displaySettings() const;
const MarginSettings &marginSettings() const;
const BehaviorSettings &behaviorSettings() const;
void ensureCursorVisible();
@@ -389,8 +390,8 @@ public:
void gotoNextWordCamelCase();
void gotoNextWordCamelCaseWithSelection();
bool selectBlockUp();
bool selectBlockDown();
virtual bool selectBlockUp();
virtual bool selectBlockDown();
void moveLineUp();
void moveLineDown();
@@ -498,6 +499,7 @@ protected:
void showDefaultContextMenu(QContextMenuEvent *e, Core::Id menuContextId);
virtual void finalizeInitialization() {}
virtual void finalizeInitializationAfterDuplication(TextEditorWidget *) {}
static QTextCursor flippedCursor(const QTextCursor &cursor);
public:
struct Link