From: Alexander Dunlap Date: Thu, 15 Feb 2018 19:28:34 +0000 (-0800) Subject: save session when we save a buffer X-Git-Tag: 2.3.1~133^2~72 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=257f978d626d272abc2212bdd4c3e64a65eacf63;p=features.git save session when we save a buffer Implements enhancement #10712. (cherry picked from commit cca365f26c7d541cc13453fc42fc9b6de7736319) --- diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 2aee2735d3..361439bee0 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -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; } diff --git a/status.23x b/status.23x index 726bcf4644..65854cb0a7 100644 --- a/status.23x +++ b/status.23x @@ -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