commit c3a453512a0ffff04a29dab8ee46c0f0d45723d2
parent e413ed8e1d8a60e44f07dd8d8080d783ce009039
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 16 Oct 2022 11:12:48 +0200
startup: report an empty search string also when there is a modifier
Not just for +/ (a search command without a string) should nano report
an "Empty search string", but also for +c/ or +r/ or similar.
This fixes https://savannah.gnu.org/bugs/?63222.
Bug existed since version 4.4, commit 2326bf69.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/nano.c b/src/nano.c
@@ -2454,7 +2454,7 @@ int main(int argc, char **argv)
searchstring = copy_of(&argv[optind][n + 1]);
if (argv[optind][n] == '?')
SET(BACKWARDS_SEARCH);
- } else if (n == 1)
+ } else
statusline(ALERT, _("Empty search string"));
optind++;
} else