mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-20 23:00:29 +00:00
* src/Text3.cpp (cursorPrevious, cursorNext):
- Fix a crash when pressing "page up" while the cursor is in an empty paragraph (bug 4570); patch by Jean-Marc, slightly extended by advice of Abdel. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@23160 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9cacf64790
commit
de263dca11
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* \file text3.cpp
|
* \file Text3.cpp
|
||||||
* This file is part of LyX, the document processor.
|
* This file is part of LyX, the document processor.
|
||||||
* Licence details can be found in the file COPYING.
|
* Licence details can be found in the file COPYING.
|
||||||
*
|
*
|
||||||
@ -204,8 +204,7 @@ void Text::cursorPrevious(Cursor & cur)
|
|||||||
pos_type cpos = cur.pos();
|
pos_type cpos = cur.pos();
|
||||||
pit_type cpar = cur.pit();
|
pit_type cpar = cur.pit();
|
||||||
|
|
||||||
int x = cur.x_target();
|
setCursorFromCoordinates(cur, cur.x_target(), 0);
|
||||||
setCursorFromCoordinates(cur, x, 0);
|
|
||||||
cur.dispatch(FuncRequest(cur.selection()? LFUN_UP_SELECT: LFUN_UP));
|
cur.dispatch(FuncRequest(cur.selection()? LFUN_UP_SELECT: LFUN_UP));
|
||||||
|
|
||||||
if (cpar == cur.pit() && cpos == cur.pos())
|
if (cpar == cur.pit() && cpos == cur.pos())
|
||||||
@ -215,6 +214,12 @@ void Text::cursorPrevious(Cursor & cur)
|
|||||||
|
|
||||||
finishUndo();
|
finishUndo();
|
||||||
cur.updateFlags(Update::Force | Update::FitCursor);
|
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();
|
finishUndo();
|
||||||
cur.updateFlags(Update::Force | Update::FitCursor);
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -161,6 +161,9 @@ What's new
|
|||||||
displayed when hovering over a char style had to be disabled for
|
displayed when hovering over a char style had to be disabled for
|
||||||
the time being (bug 4559).
|
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).
|
- Do not exit after catching an iconv exception (bug 4385, part 2).
|
||||||
|
|
||||||
- Fix update/drawing of character style insets.
|
- Fix update/drawing of character style insets.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user