diff options
| author | christos <christos@NetBSD.org> | 2016-06-02 21:40:51 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2016-06-02 21:40:51 +0000 |
| commit | 83d95411cfc8ffbf8cf7de96a4aeb6f71967fc7e (patch) | |
| tree | 11dc8d53d87d39e95a5e9608452a7074476005f8 /lib/libedit | |
| parent | 1d850914bc23a4dfd91b7762f84606904a337b16 (diff) | |
Fix previous to better match readline behavior (Ingo Schwarze)
Diffstat (limited to 'lib/libedit')
| -rw-r--r-- | lib/libedit/readline.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libedit/readline.c b/lib/libedit/readline.c index f1a0fc0bbdc..83c09bf9f36 100644 --- a/lib/libedit/readline.c +++ b/lib/libedit/readline.c @@ -1,4 +1,4 @@ -/* $NetBSD: readline.c,v 1.135 2016/06/02 15:11:18 christos Exp $ */ +/* $NetBSD: readline.c,v 1.136 2016/06/02 21:40:51 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: readline.c,v 1.135 2016/06/02 15:11:18 christos Exp $"); +__RCSID("$NetBSD: readline.c,v 1.136 2016/06/02 21:40:51 christos Exp $"); #endif /* not lint && not SCCSID */ #include <sys/types.h> @@ -1185,6 +1185,8 @@ stifle_history(int max) if (history(h, &ev, H_SETSIZE, max) == 0) { max_input_history = max; + if (history_length > max) + history_base = history_length - max; while (history_length > max) { he = remove_history(0); el_free(he->data); |
