Mercurial > hg > octave-nkf
diff src/oct-hist.cc @ 5800:e8be7fe586f9
[project @ 2006-05-10 06:50:45 by jwe]
author | jwe |
---|---|
date | Wed, 10 May 2006 06:50:45 +0000 |
parents | 1138ced03f14 |
children | 44f24cf66b95 |
line wrap: on
line diff
--- a/src/oct-hist.cc +++ b/src/oct-hist.cc @@ -552,7 +552,8 @@ initialize_history (void) { command_history::set_file (file_ops::tilde_expand (Vhistory_file)); - + command_history::set_size (Vhistory_size); + command_history::read (false); } @@ -691,7 +692,15 @@ @seealso{history_file, history_timestamp_format, saving_history}\n\ @end deftypefn") { - return SET_INTERNAL_VARIABLE_WITH_LIMITS (history_size, -1, INT_MAX); + int saved_history_size = Vhistory_size; + + octave_value retval + = SET_INTERNAL_VARIABLE_WITH_LIMITS (history_size, -1, INT_MAX); + + if (Vhistory_size != saved_history_size) + command_history::set_size (Vhistory_size); + + return retval; } DEFUN (history_file, args, nargout, @@ -712,7 +721,7 @@ if (Vhistory_file != saved_history_file) command_history::set_file (file_ops::tilde_expand (Vhistory_file)); - return retval;; + return retval; } DEFUN (history_timestamp_format_string, args, nargout,