From eac550debf2af771852c34f35abdfeaa33a72605 Mon Sep 17 00:00:00 2001 From: khasan Date: Thu, 8 Aug 2024 22:12:59 +0300 Subject: [PATCH] Edit the first search result if available --- src/hstr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hstr.c b/src/hstr.c index 8183031b..e7b86838 100644 --- a/src/hstr.c +++ b/src/hstr.c @@ -1598,7 +1598,11 @@ void loop_to_select(void) favorites_choose(hstr->favorites,result); } } else { - result=pattern; + if (hstr->selectionSize > 0) { + result=hstr->selection[0]; + } else { + result=pattern; + } } done=TRUE; break;