From cf4f79f884fd660887b3827314657dcc797e2916 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Sat, 18 Apr 2015 20:31:18 -0400 Subject: [PATCH] Preview and math now update on screen-up (#6173) When editing a preview inset, or math, when we leave the inset, we should update the preview. This update now happens for screen-up and screen-down (commonly bound to Page Up and Page Down). Note that this is only relevant if preview is turned on in preferences. This commit probably fixes other issues for any inset that defines notifyCursorLeaves(). This fixes only part of #6173. --- src/BufferView.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 8948b73d2d..8a947c169f 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1748,6 +1748,8 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) Cursor old = cur; bool const in_texted = cur.inTexted(); cur.setCursor(doc_iterator_begin(cur.buffer())); + if (cur != old) + notifyCursorLeavesOrEnters(old, cur); cur.selHandle(false); buffer_.changed(true); updateHoveredInset(); -- 2.39.2