mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-28 20:55:11 +00:00
Fix assertion failure on page up / page down
I had overlooked {beginning,end}-of-history which don't search.
This commit is contained in:
parent
e40441f901
commit
12a9cb2940
1 changed files with 3 additions and 3 deletions
|
@ -1997,10 +1997,10 @@ void reader_data_t::update_command_line_from_history_search() {
|
||||||
}
|
}
|
||||||
if (history_search.by_token()) {
|
if (history_search.by_token()) {
|
||||||
replace_current_token(std::move(new_text));
|
replace_current_token(std::move(new_text));
|
||||||
} else {
|
} else if (history_search.by_line() || history_search.by_prefix()) {
|
||||||
assert((history_search.by_line() || history_search.by_prefix()) &&
|
|
||||||
"Unknown history search type");
|
|
||||||
el->replace_substring(0, el->size(), std::move(new_text));
|
el->replace_substring(0, el->size(), std::move(new_text));
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
command_line_has_transient_edit = true;
|
command_line_has_transient_edit = true;
|
||||||
assert(el == &command_line);
|
assert(el == &command_line);
|
||||||
|
|
Loading…
Reference in a new issue