diff options
| author | christos <christos@NetBSD.org> | 2011-07-26 21:03:17 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2011-07-26 21:03:17 +0000 |
| commit | f81c8a24af1d2f1db5a11d677fd0cb5db041eb0b (patch) | |
| tree | 4338cc5ce23c5eb67ec0daa0e6bfe8b1698e9b1e /lib/libedit | |
| parent | 9d3c07c5f3b032e3472d80875d6ca2e7e7313e21 (diff) | |
don't stop reading after empty lines from: Nirbhay Choubey
Diffstat (limited to 'lib/libedit')
| -rw-r--r-- | lib/libedit/el.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libedit/el.c b/lib/libedit/el.c index 3304ae91dd2..7ae549b66bd 100644 --- a/lib/libedit/el.c +++ b/lib/libedit/el.c @@ -1,4 +1,4 @@ -/* $NetBSD: el.c,v 1.62 2011/03/20 12:36:14 bouyer Exp $ */ +/* $NetBSD: el.c,v 1.63 2011/07/26 21:03:17 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)el.c 8.2 (Berkeley) 1/3/94"; #else -__RCSID("$NetBSD: el.c,v 1.62 2011/03/20 12:36:14 bouyer Exp $"); +__RCSID("$NetBSD: el.c,v 1.63 2011/07/26 21:03:17 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -540,6 +540,8 @@ el_source(EditLine *el, const char *fname) return (-1); while ((ptr = fgetln(fp, &len)) != NULL) { + if (*ptr == '\n') + continue; /* Empty line. */ dptr = ct_decode_string(ptr, &el->el_scratch); if (!dptr) continue; |
