From 1371fb6326935b48891dcc76057b0eae5417fdd8 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Tue, 3 Jun 2008 06:21:31 +0000 Subject: [PATCH] Tentative fix for bug #23144: using arrow keys in search buffer affects main window git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4263 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 4 ++++ src/search.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index f9ac666a..8ef02d07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-05-31 Chris Allegretta + * prompt.c: Tentative fix for bug #23144: using arrow keys in + search buffer affects main window (by Mike Frysinger) + 2008-05-31 Chris Allegretta * global.c: Fix for Savannah bug #23442: left/right arrow keys do not work with --enable-tiny (by Mike Frysinger) diff --git a/src/search.c b/src/search.c index cee7ac1f..f050e2b8 100644 --- a/src/search.c +++ b/src/search.c @@ -1383,7 +1383,7 @@ char *get_history_older(filestruct **h) assert(h != NULL); if ((*h)->prev == NULL) - return NULL; + return (*h)->data; *h = (*h)->prev; @@ -1397,7 +1397,7 @@ char *get_history_newer(filestruct **h) assert(h != NULL); if ((*h)->next == NULL) - return NULL; + return (*h)->data; *h = (*h)->next; -- 2.39.5