From 257f978d626d272abc2212bdd4c3e64a65eacf63 Mon Sep 17 00:00:00 2001 From: Alexander Dunlap Date: Thu, 15 Feb 2018 11:28:34 -0800 Subject: [PATCH] save session when we save a buffer Implements enhancement #10712. (cherry picked from commit cca365f26c7d541cc13453fc42fc9b6de7736319) --- src/frontends/qt4/GuiView.cpp | 5 ++++- status.23x | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) 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