summaryrefslogtreecommitdiff
path: root/editors/cle/files/patch-src_cle.c
blob: df620bdaa6e0b7a6fb655a059d208eb589130c38 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- src/cle.c	Sat Dec  4 00:41:14 1999
+++ src/cle.c	Fri Mar 24 15:46:07 2006
@@ -147,8 +147,10 @@
         rl_prep_terminal(_rl_meta_flag);	/* Place the terminal in raw mode */
       } else {
 	/* We are still in echo mode. Register the line in the history */
-        add_history(s);
         len= strlen(s);
+		if (len > 0) {
+        	add_history(s);
+		  }
         s[len]= '\n';
         write(fd, s, len+1);
       }