commit 447a1056b4f97b102db9666a131ce85001c0676c
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Thu Mar 11 16:16:11 2021 +0100

    Fix bookmarks-goto inside insets.
    
    A stupid oversight, as far as I can see.
---
 src/BufferView.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/BufferView.cpp b/src/BufferView.cpp
index 730f0e5..4289e31 100644
--- a/src/BufferView.cpp
+++ b/src/BufferView.cpp
@@ -913,7 +913,7 @@ bool BufferView::moveToPosition(pit_type bottom_pit, 
pos_type bottom_pos,
        // restoration is inaccurate. If a bookmark was within an inset,
        // it will be restored to the left of the outmost inset that contains
        // the bookmark.
-       if (bottom_pit < int(buffer_.paragraphs().size())) {
+       if (!success && bottom_pit < int(buffer_.paragraphs().size())) {
                dit = doc_iterator_begin(&buffer_);
 
                dit.pit() = bottom_pit;
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to