X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FCursor.h;h=b19a12a9ae80e2acc95b53ef8b8850246340437f;hb=fab1494f49c0a25f46921db5dc142d7d05f17d17;hp=2b1505a5489c061ef1bfaab053e82ed8314df3b9;hpb=c2befc2b1e9961ad75d799b05c9fb201a73675a5;p=lyx.git diff --git a/src/Cursor.h b/src/Cursor.h index 2b1505a548..b19a12a9ae 100644 --- a/src/Cursor.h +++ b/src/Cursor.h @@ -65,7 +65,7 @@ public: void leaveInset(Inset const & inset); /// sets cursor part void setCursor(DocIterator const & it); - /// sets the cursor to the anchor + /// sets the cursor to the normalized selection anchor void setCursorToAnchor(); /// @@ -84,6 +84,10 @@ public: /// do we have a multiline selection? bool selIsMultiLine() const { return selection_ && selBegin().pit() != selEnd().pit(); } + /// + void setWordSelection(bool set) { word_selection_ = set; } + /// + bool wordSelection() { return word_selection_; } /// did we place the anchor? bool mark() const { return mark_; } /// did we place the anchor? @@ -312,6 +316,8 @@ private: bool selection_; /// are we on the way to get one? bool mark_; + /// are we in word-selection mode? This is set when double clicking. + bool word_selection_; /// If true, we are behind the previous char, otherwise we are in front // of the next char. This only make a difference when we are in front // of a big inset spanning a whole row and computing coordinates for