mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 20:31:19 -03:00
Fixed crash caused by pressing pageup button when no match (for typed command) in history is found
This commit is contained in:
@@ -3196,8 +3196,10 @@ const wchar_t *reader_readline()
|
|||||||
{
|
{
|
||||||
data->history_search = history_search_t(*data->history, data->command_line, HISTORY_SEARCH_TYPE_PREFIX);
|
data->history_search = history_search_t(*data->history, data->command_line, HISTORY_SEARCH_TYPE_PREFIX);
|
||||||
data->history_search.go_to_beginning();
|
data->history_search.go_to_beginning();
|
||||||
wcstring new_text = data->history_search.current_string();
|
if (! data->history_search.is_at_end()) {
|
||||||
set_command_line_and_position(new_text, new_text.size());
|
wcstring new_text = data->history_search.current_string();
|
||||||
|
set_command_line_and_position(new_text, new_text.size());
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user