From 754ead5010b6caeb401712e4f4e9c7cecf1b5ecf Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 24 Oct 2008 15:46:44 +0000 Subject: [PATCH] Fix bug 5310: http://bugzilla.lyx.org/show_bug.cgi?id=5310 * BufferView.cpp (dispatch): make sure to repaint the document after jumping to a new change. * lyxfind.cpp (findNextChange): do not ignore the last character when a change extends to the end of an inset. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27083 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.cpp | 6 +++++- src/lyxfind.cpp | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index cea5b723c6..02d8fcdc98 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1154,11 +1154,15 @@ bool BufferView::dispatch(FuncRequest const & cmd) case LFUN_CHANGE_NEXT: findNextChange(this); + // FIXME: Move this LFUN to Buffer so that we don't have to do this: + processUpdateFlags(Update::Force | Update::FitCursor); break; case LFUN_CHANGES_MERGE: - if (findNextChange(this)) + if (findNextChange(this)) { + processUpdateFlags(Update::Force | Update::FitCursor); showDialog("changes"); + } break; case LFUN_ALL_CHANGES_ACCEPT: diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index 0cfd2cf868..fbb515ba39 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -333,10 +333,6 @@ bool findNextChange(BufferView * bv) if (change != orig_change) break; } - // avoid crash (assertion violation) if the imaginary end-of-par - // character of the last paragraph of the document is marked as changed - if (tip.at_end()) - tip.backwardPos(); // Now put cursor to end of selection: bv->cursor().setCursor(cur);