mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-20 02:32:46 +08:00
Make control-S begin navigating the pager contents
In addition to showing the search field, actually allow the user to type in it.
This commit is contained in:
parent
dfa61926e8
commit
6bd3474daf
|
@ -1,4 +1,3 @@
|
|||
<<<<<<< HEAD
|
||||
# fish 3.0.1
|
||||
|
||||
This release of fish fixes a number of major issues discovered in fish 3.0.0.
|
||||
|
@ -9,6 +8,8 @@ This release of fish fixes a number of major issues discovered in fish 3.0.0.
|
|||
- while loops now evaluate to the last executed command in the loop body (or zero if the body was empty), matching POSIX semantics.
|
||||
- `read --silent` no longer echoes to the tty when run from a non-interactive script (#5519)
|
||||
- (macOS only) /etc/paths and /etc/paths.d now correctly set path entries with spaces. Also affects MANPATH. (#5481)
|
||||
- fish does not hang on launch when running under Cygwin/MSYS2
|
||||
- The pager-toggle-search binding (by default Control-S) now positions the cursor in the completions list.
|
||||
|
||||
If you are upgrading from version 2.7.1 or before, please also review the release notes for 3.0.0 and 3.0b1 (included below).
|
||||
|
||||
|
|
|
@ -2711,10 +2711,15 @@ const wchar_t *reader_readline(int nchars) {
|
|||
break;
|
||||
}
|
||||
case R_PAGER_TOGGLE_SEARCH: {
|
||||
if (data->is_navigating_pager_contents()) {
|
||||
if (!data->pager.empty()) {
|
||||
// Toggle search, and begin navigating if we are now searching.
|
||||
bool sfs = data->pager.is_search_field_shown();
|
||||
data->pager.set_search_field_shown(!sfs);
|
||||
data->pager.set_fully_disclosed(true);
|
||||
if (data->pager.is_search_field_shown() &&
|
||||
!data->is_navigating_pager_contents()) {
|
||||
select_completion_in_direction(direction_south);
|
||||
}
|
||||
reader_repaint_needed();
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue
Block a user