From bbdfe126a719d2bcbaa852b15c180d387176913b Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 30 Sep 2020 17:33:50 +0200 Subject: [PATCH] Flash if history search found nothing This makes it clearer that we're at the end. Fixes #7362. --- CHANGELOG.rst | 1 + src/reader.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f57ac5631..aeef1bea3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -124,6 +124,7 @@ Interactive improvements - ``open`` no longer hangs indefinitely as a bug in ``xdg-open`` has been worked around (#7215). - Long command lines no longer add a blank line after execution (#6826) and behave better with backspace (#6951). - ``functions -t`` works as documented (#6985). +- History search now flashes when it found no more results (#7362) New or improved bindings ^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/reader.cpp b/src/reader.cpp index 9e2538610..50b022a68 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -3141,6 +3141,10 @@ void reader_data_t::handle_readline_command(readline_cmd_t c, readline_loop_stat ? history_search_direction_t::backward : history_search_direction_t::forward; bool found = history_search.move_in_direction(dir); + + // Signal that we've found nothing + if (!found) flash(); + if (!found && !was_active_before) { history_search.reset(); break;