summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--octave_kernel.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/octave_kernel.py b/octave_kernel.py
index 9d817b6..86708d6 100644
--- a/octave_kernel.py
+++ b/octave_kernel.py
@@ -226,7 +226,7 @@ class OctaveKernel(Kernel):
if self.hist_file:
with open(self.hist_file, 'wb') as fid:
- fid.write('\n'.join(self.hist_cache[:self.max_hist_cache]))
+ fid.write('\n'.join(self.hist_cache[-self.max_hist_cache:]))
return {'status': 'ok', 'restart': restart}