Fix crash related to undo and continuous spell checking

The cursor member new_word_ should not be saved in undo.
Move it from CursorData to Cursor.
This commit is contained in:
Jean-Marc Lasgouttes 2012-12-11 10:14:47 +01:00
parent 945c0e4127
commit 146b754f1d
2 changed files with 4 additions and 2 deletions

View File

@ -286,6 +286,8 @@ void Cursor::reset()
push_back(CursorSlice(buffer()->inset()));
anchor_ = doc_iterator_begin(buffer());
anchor_.clear();
new_word_ = doc_iterator_begin(buffer());
new_word_.clear();
clearTargetX();
selection_ = false;
mark_ = false;

View File

@ -52,8 +52,6 @@ public:
protected:
/// the anchor position
DocIterator anchor_;
/// the start of the new born word
DocIterator new_word_;
///
mutable DispatchResult disp_;
/// do we have a selection?
@ -394,6 +392,8 @@ private:
int x_target_;
/// if a x_target cannot be hit exactly in a text, put the difference here
int textTargetOffset_;
/// the start of the new born word
DocIterator new_word_;
/// position before dispatch started
DocIterator beforeDispatchCursor_;
/// cursor screen coordinates before dispatch started