commit 257f978d626d272abc2212bdd4c3e64a65eacf63
Author: Alexander Dunlap <[email protected]>
Date: Thu Feb 15 11:28:34 2018 -0800
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 deletions(-)
diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp
index 2aee273..361439b 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 726bcf4..65854cb 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