changeset 12990:07dc4839c05f

properly save and restore command history file name in history command (bug #32524) * oct-hist.cc (do_history): Protect command_history file.
author John W. Eaton <jwe@octave.org>
date Tue, 23 Aug 2011 17:11:31 -0400
parents 00235a6446da
children 64378396e7a6
files src/oct-hist.cc
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/oct-hist.cc
+++ b/src/oct-hist.cc
@@ -133,6 +133,10 @@
 {
   int numbered_output = 1;
 
+  unwind_protect frame;
+
+  frame.add_fcn (command_history::set_file, command_history::file ());
+
   int i;
   for (i = 1; i < argc; i++)
     {