From b8907548e947260a2a463c57a66bed4079c09817 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 29 May 2016 11:52:41 +0200 Subject: [PATCH] history: compare the full search strings, not just the leading part This reverts commit df8c3de from six years ago, which was intended to prevent a crash on Armel, but causes nano to lose history items. This fixes https://savannah.gnu.org/bugs/?48048. --- src/search.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.c b/src/search.c index 622f158..c1b091e 100644 --- a/src/search.c +++ b/src/search.c @@ -1221,7 +1221,7 @@ void update_history(filestruct **h, const char *s) assert(hage != NULL && hbot != NULL); /* If this string is already in the history, delete it. */ - p = find_history(*hbot, *hage, s, strlen(s)); + p = find_history(*hbot, *hage, s, (size_t)-1); if (p != NULL) { filestruct *foo, *bar; -- 2.8.1