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();
///
DocIterator anchor_;
///
- DispatchResult disp_;
+ mutable DispatchResult disp_;
///
- DocIterator const & beforeDispatchCursor() { return beforeDispatchCursor_; }
-
+ DocIterator const & beforeDispatchCursor() const { return beforeDispatchCursor_; }
+ ///
+ void saveBeforeDispatchPosXY();
+
private:
/**
* The target x position of the cursor. This is used for when
bool logicalpos_;
/// position before dispatch started
DocIterator beforeDispatchCursor_;
+ /// cursor screen coordinates before dispatch started
+ int beforeDispatchPosX_;
+ int beforeDispatchPosY_;
+
// FIXME: make them private.
public: