]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt/GuiView.cpp
Fix use of BookmarkSection::size()
[features.git] / src / frontends / qt / GuiView.cpp
index ae8bc285ffc50282ce47ac9a835b0329ac50e83c..714af17b6883c863761ad459d0c43dd200f77f1c 100644 (file)
@@ -3297,9 +3297,10 @@ bool GuiView::closeBuffer(Buffer & buf)
        if (success) {
                // goto bookmark to update bookmark pit.
                // FIXME: we should update only the bookmarks related to this buffer!
+               // FIXME: this is done also in LFUN_WINDOW_CLOSE!
                LYXERR(Debug::DEBUG, "GuiView::closeBuffer()");
-               for (unsigned int i = 0; i < theSession().bookmarks().size(); ++i)
-                       guiApp->gotoBookmark(i + 1, false, false);
+               for (unsigned int i = 1; i < theSession().bookmarks().size(); ++i)
+                       guiApp->gotoBookmark(i, false, false);
 
                if (saveBufferIfNeeded(buf, false)) {
                        buf.removeAutosaveFile();