From 7ad10f74032cefe9818de0031325ff042f61e6da Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Wed, 25 Mar 2009 21:00:34 +0000 Subject: [PATCH] Fix bug 5434: DEPM not executed for PgUp/PgDown http://bugzilla.lyx.org/show_bug.cgi?id=5434 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28909 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 3b31fd5b5f..67f45d6101 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1448,12 +1448,16 @@ bool BufferView::dispatch(FuncRequest const & cmd) p = Point(0, 0); if (cmd.action == LFUN_SCREEN_DOWN && scrolled < height_) p = Point(width_, height_); + Cursor old = cur; cur.reset(buffer_.inset()); updateMetrics(); buffer_.changed(); d->text_metrics_[&buffer_.text()].editXY(cur, p.x_, p.y_); //FIXME: what to do with cur.x_target()? + bool const update = cur.bv().checkDepm(cur, old); cur.finishUndo(); + if (update) + processUpdateFlags(Update::Force | Update::FitCursor); break; }