Module Name: src Committed By: christos Date: Mon Jan 9 03:09:05 UTC 2017
Modified Files: src/lib/libedit: readline.c Log Message: Make sure we take into account history_base when computing negative history offsets. (Gerry Swinslow) To generate a diff of this commit: cvs rdiff -u -r1.139 -r1.140 src/lib/libedit/readline.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libedit/readline.c diff -u src/lib/libedit/readline.c:1.139 src/lib/libedit/readline.c:1.140 --- src/lib/libedit/readline.c:1.139 Fri Oct 28 14:32:26 2016 +++ src/lib/libedit/readline.c Sun Jan 8 22:09:05 2017 @@ -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 @@ get_history_event(const char *cmd, int * idx++; } if (sign) - num = history_length - num + 1; + num = history_length - num + history_base; if (!(he = history_get(num))) return NULL;