diff liboctave/cmd-hist.cc @ 2512:fda09c1e787e

[project @ 1996-11-14 08:39:41 by jwe]
author jwe
date Thu, 14 Nov 1996 08:39:47 +0000
parents 1e673f0648b5
children dd71eb0bb414
line wrap: on
line diff
--- a/liboctave/cmd-hist.cc
+++ b/liboctave/cmd-hist.cc
@@ -119,6 +119,10 @@
 {
   if (! ignoring_entries ())
     {
+      if (s.empty ()
+	  || (s.length () == 1 && (s[0] == '\r' || s[0] == '\n')))
+	return;
+
       ::add_history (s.c_str ());
       lines_this_session++;
     }