diff --git a/src/Text3.cpp b/src/Text3.cpp index 68cbb0655f..15146b3a73 100644 --- a/src/Text3.cpp +++ b/src/Text3.cpp @@ -1,5 +1,5 @@ /** - * \file text3.cpp + * \file Text3.cpp * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * @@ -204,8 +204,7 @@ void Text::cursorPrevious(Cursor & cur) pos_type cpos = cur.pos(); pit_type cpar = cur.pit(); - int x = cur.x_target(); - setCursorFromCoordinates(cur, x, 0); + setCursorFromCoordinates(cur, cur.x_target(), 0); cur.dispatch(FuncRequest(cur.selection()? LFUN_UP_SELECT: LFUN_UP)); if (cpar == cur.pit() && cpos == cur.pos()) @@ -215,6 +214,12 @@ void Text::cursorPrevious(Cursor & cur) finishUndo(); cur.updateFlags(Update::Force | Update::FitCursor); + /* one of the dispatch calls above may have set the dispatched + * status of the cursor to false. Did I ever say that calling + * cur.dispatch directly is a bad idea? See bug 4570 for a + * possible consequence (JMarc) + */ + cur.dispatched(); } @@ -235,6 +240,12 @@ void Text::cursorNext(Cursor & cur) finishUndo(); cur.updateFlags(Update::Force | Update::FitCursor); + /* one of the dispatch calls above may have set the dispatched + * status of the cursor to false. Did I ever say that calling + * cur.dispatch directly is a bad idea? See bug 4570 for a + * possible consequence (JMarc) + */ + cur.dispatched(); } diff --git a/status.15x b/status.15x index b89402f44e..fa7630eb80 100644 --- a/status.15x +++ b/status.15x @@ -161,6 +161,9 @@ What's new displayed when hovering over a char style had to be disabled for the time being (bug 4559). +- Fix a crash when pressing "page up" while the cursor is in an empty + paragraph (bug 4570). + - Do not exit after catching an iconv exception (bug 4385, part 2). - Fix update/drawing of character style insets.