]> git.lyx.org Git - lyx.git/commitdiff
Undo cursor/selection bug fix.
authorJürgen Vigna <jug@sad.it>
Fri, 24 May 2002 10:37:46 +0000 (10:37 +0000)
committerJürgen Vigna <jug@sad.it>
Fri, 24 May 2002 10:37:46 +0000 (10:37 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4197 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/undo_funcs.C

index a75ec18fb17bf8c3eb958c8023e0e31e7c14216b..dea1a7a17d48b778b103c2cd439f56af3391f76b 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-24  Juergen Vigna  <jug@sad.it>
+
+       * undo_funcs.C (textHandleUndo): fix the cursor selection after
+       setting the undo_cursor.
+
 2002-05-23  John Levon  <moz@compsoc.man.ac.uk>
 
        * BufferView_pimpl.C:
index d8304ed94b6fb16ca4ab3549429612bb341b57ad..8a9afeee357b1175d405f8b4c67551ac5a1c239d 100644 (file)
@@ -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());
                        }
                }