ports/editors/cle/files/patch-src_cle.c
Renato Botelho 74a8f3472b Cle is a Command Line Editor. It provides the editing/history/completion
commands of the GNU readline package to any line-oriented Unix command.

WWW: http://kaolin.unice.fr/Cle/

PR:		ports/100855
Submitted by:	Timothy Bourke <timbob at bigpond.com>
2006-07-26 11:31:46 +00:00

14 lines
425 B
C

--- 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);
}