Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit Make sure we take into account history_base when...
details: https://anonhg.NetBSD.org/src/rev/ddad7c92ee9c
branches: trunk
changeset: 350268:ddad7c92ee9c
user: christos <christos%NetBSD.org@localhost>
date: Mon Jan 09 03:09:05 2017 +0000
description:
Make sure we take into account history_base when computing negative history
offsets. (Gerry Swinslow)
diffstat:
lib/libedit/readline.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 2febb8cd2967 -r ddad7c92ee9c lib/libedit/readline.c
--- a/lib/libedit/readline.c Mon Jan 09 03:05:48 2017 +0000
+++ b/lib/libedit/readline.c Mon Jan 09 03:09:05 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: readline.c,v 1.139 2016/10/28 18:32:26 christos Exp $ */
+/* $NetBSD: readline.c,v 1.140 2017/01/09 03:09:05 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.139 2016/10/28 18:32:26 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.140 2017/01/09 03:09:05 christos Exp $");
#endif /* not lint && not SCCSID */
#include <sys/types.h>
@@ -556,7 +556,7 @@
idx++;
}
if (sign)
- num = history_length - num + 1;
+ num = history_length - num + history_base;
if (!(he = history_get(num)))
return NULL;
Home |
Main Index |
Thread Index |
Old Index