Fix bookmarks-goto inside insets.

A stupid oversight, as far as I can see.
This commit is contained in:
Jean-Marc Lasgouttes 2021-03-11 16:16:11 +01:00
parent 86bfa10abb
commit 447a1056b4

View File

@ -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, // restoration is inaccurate. If a bookmark was within an inset,
// it will be restored to the left of the outmost inset that contains // it will be restored to the left of the outmost inset that contains
// the bookmark. // the bookmark.
if (bottom_pit < int(buffer_.paragraphs().size())) { if (!success && bottom_pit < int(buffer_.paragraphs().size())) {
dit = doc_iterator_begin(&buffer_); dit = doc_iterator_begin(&buffer_);
dit.pit() = bottom_pit; dit.pit() = bottom_pit;