From 0fde27465d9f41686bd68591060ca5598892a748 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Sat, 23 May 2020 16:47:48 +0200 Subject: [PATCH] Fix first draw of auto-open inset note-next and reference-next should trigger an update so that metrics are updated when the cursor ends up in an auto-open inset. Fixes bug #11870. (cherry picked from commit 7761e1317eaa2c880446f05b707b03067d665681) --- src/BufferView.cpp | 8 ++++++++ status.23x | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index d3d5dffea8..c15b7d3b88 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -1504,6 +1504,10 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) case LFUN_NOTE_NEXT: gotoInset(this, NOTE_CODE, false); + // FIXME: if SinglePar is changed to act on the inner + // paragraph, this will not be OK anymore. The update is + // useful for auto-open collapsible insets. + dr.screenUpdate(Update::SinglePar | Update::FitCursor); break; case LFUN_REFERENCE_NEXT: { @@ -1511,6 +1515,10 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) tmp.push_back(LABEL_CODE); tmp.push_back(REF_CODE); gotoInset(this, tmp, true); + // FIXME: if SinglePar is changed to act on the inner + // paragraph, this will not be OK anymore. The update is + // useful for auto-open collapsible insets. + dr.screenUpdate(Update::SinglePar | Update::FitCursor); break; } diff --git a/status.23x b/status.23x index d490a7058f..610d0602a4 100644 --- a/status.23x +++ b/status.23x @@ -41,6 +41,8 @@ What's new * USER INTERFACE +- Fix problem with drawing of auto-opened insets (bug 11870). + * INTERNALS -- 2.39.5