]> git.lyx.org Git - features.git/commitdiff
save session when we save a buffer
authorAlexander Dunlap <alexander.dunlap@gmail.com>
Thu, 15 Feb 2018 19:28:34 +0000 (11:28 -0800)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 21 Feb 2018 10:56:37 +0000 (11:56 +0100)
Implements enhancement #10712.

(cherry picked from commit cca365f26c7d541cc13453fc42fc9b6de7736319)

src/frontends/qt4/GuiView.cpp
status.23x

index 2aee2735d3cb6d07946c5a1f5e4dcc31f5b77b39..361439bee02f5057d2723cfffcf9d3b4c09f61a6 100644 (file)
@@ -2228,8 +2228,10 @@ Buffer * GuiView::loadDocument(FileName const & filename, bool tolastfiles)
        setBuffer(newBuffer);
        newBuffer->errors("Parse");
 
-       if (tolastfiles)
+       if (tolastfiles) {
                theSession().lastFiles().add(filename);
+               theSession().writeFile();
+  }
 
        return newBuffer;
 }
@@ -2768,6 +2770,7 @@ bool GuiView::saveBuffer(Buffer & b, FileName const & fn)
        bool const success = (fn.empty() ? b.save() : b.saveAs(fn));
        if (success) {
                theSession().lastFiles().add(b.fileName());
+               theSession().writeFile();
                return true;
        }
 
index 726bcf464405042cb783a1c781b9305e975037d5..65854cb0a7304c063243373eadda28522513fce8 100644 (file)
@@ -67,6 +67,8 @@ What's new
 - Fix display of citation labels when pasting from a document
   with other citation type (bug 10829).
 
+- Save the list of recent files when a file is open/saved so that it
+  is up to date after a crash (bug 10712).
 
 * INTERNALS