From b7a265b19ebc97e7a884728ffea9dfddf0cf8691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Vigna?= Date: Fri, 24 May 2002 10:37:46 +0000 Subject: [PATCH] Undo cursor/selection bug fix. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4197 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 +++++ src/undo_funcs.C | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index a75ec18fb1..dea1a7a17d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2002-05-24 Juergen Vigna + + * undo_funcs.C (textHandleUndo): fix the cursor selection after + setting the undo_cursor. + 2002-05-23 John Levon * BufferView_pimpl.C: diff --git a/src/undo_funcs.C b/src/undo_funcs.C index d8304ed94b..8a9afeee35 100644 --- a/src/undo_funcs.C +++ b/src/undo_funcs.C @@ -240,6 +240,10 @@ bool textHandleUndo(BufferView * bv, Undo * undo) t = bv->text; } t->setCursorIntern(bv, tmppar, undo->cursor_pos); + // clear any selection and set the selection cursor + // for an evt. new selection. + t->clearSelection(); + t->selection.cursor = t->cursor; t->updateCounters(bv, t->cursor.row()); bv->fitCursor(); } @@ -258,6 +262,10 @@ bool textHandleUndo(BufferView * bv, Undo * undo) t = bv->text; } t->setCursorIntern(bv, tmppar, undo->cursor_pos); + // clear any selection and set the selection cursor + // for an evt. new selection. + t->clearSelection(); + t->selection.cursor = t->cursor; t->updateCounters(bv, t->cursor.row()); } }