mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-29 21:43:55 +08:00
Remove support for invoking old pager
This commit is contained in:
parent
20f9dd9a6b
commit
6c096191ba
13
parser.cpp
13
parser.cpp
|
@ -3152,16 +3152,3 @@ bool parser_use_ast(void)
|
|||
return from_string<bool>(var);
|
||||
}
|
||||
}
|
||||
|
||||
bool pager_use_inline(void)
|
||||
{
|
||||
env_var_t var = env_get_string(L"fish_new_pager");
|
||||
if (var.missing_or_empty())
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return from_string<bool>(var);
|
||||
}
|
||||
}
|
||||
|
|
1
parser.h
1
parser.h
|
@ -550,7 +550,6 @@ public:
|
|||
|
||||
/* Temporary */
|
||||
bool parser_use_ast(void);
|
||||
bool pager_use_inline(void);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
18
reader.cpp
18
reader.cpp
|
@ -1988,11 +1988,8 @@ static bool handle_completions(const std::vector<completion_t> &comp, bool conti
|
|||
|
||||
wchar_t quote;
|
||||
parse_util_get_parameter_info(el->text, el->position, "e, NULL, NULL);
|
||||
bool is_quoted = (quote != L'\0');
|
||||
|
||||
if (pager_use_inline())
|
||||
{
|
||||
/* Inline pager */
|
||||
/* Update the pager data */
|
||||
data->pager.set_prefix(prefix);
|
||||
data->pager.set_completions(surviving_completions);
|
||||
|
||||
|
@ -2001,19 +1998,6 @@ static bool handle_completions(const std::vector<completion_t> &comp, bool conti
|
|||
|
||||
/* Modify the command line to reflect the new pager */
|
||||
data->pager_selection_changed();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Classic pager. Clear the autosuggestion from the old commandline before abandoning it (see #561) */
|
||||
if (! data->autosuggestion.empty())
|
||||
reader_repaint_without_autosuggestion();
|
||||
|
||||
write_loop(1, "\n", 1);
|
||||
|
||||
run_pager(prefix, is_quoted, surviving_completions);
|
||||
|
||||
s_reset(&data->screen, screen_reset_abandon_line);
|
||||
}
|
||||
|
||||
reader_repaint_needed();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user