mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 17:31:14 -03:00
Fix "commandline --paging-mode" false negative when there is no room for pager
The pager still works even if there is no room to render it. So let's make "commandline --paging-mode" return true if there is an off-screen pager. This fixes the problem with the upcoming history-pager described in https://github.com/fish-shell/fish-shell/pull/9089#issuecomment-1196945456
This commit is contained in:
@@ -2798,7 +2798,7 @@ void reader_data_t::update_commandline_state() const {
|
||||
snapshot->cursor_pos = this->command_line.position();
|
||||
snapshot->history = this->history;
|
||||
snapshot->selection = this->get_selection();
|
||||
snapshot->pager_mode = !this->current_page_rendering.screen_data.empty();
|
||||
snapshot->pager_mode = this->is_navigating_pager_contents();
|
||||
snapshot->pager_fully_disclosed = this->current_page_rendering.remaining_to_disclose == 0;
|
||||
snapshot->search_mode = this->history_search.active();
|
||||
snapshot->initialized = true;
|
||||
|
||||
Reference in New Issue
Block a user