mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Switch certain environment callbacks from named to anonymous
This commit is contained in:
parent
987e41de12
commit
a4fe3c87ae
1 changed files with 7 additions and 16 deletions
|
@ -221,14 +221,12 @@ void env_universal_callbacks(env_stack_t *stack, const callback_data_list_t &cal
|
|||
}
|
||||
}
|
||||
|
||||
static void handle_fish_term_change(const wcstring &var_name, env_stack_t &vars) {
|
||||
UNUSED(var_name);
|
||||
static void handle_fish_term_change(env_stack_t &vars) {
|
||||
update_fish_color_support(vars);
|
||||
reader_react_to_color_change();
|
||||
}
|
||||
|
||||
static void handle_change_ambiguous_width(const wcstring &var_name, env_stack_t &vars) {
|
||||
UNUSED(var_name);
|
||||
static void handle_change_ambiguous_width(env_stack_t &vars) {
|
||||
int new_width = 1;
|
||||
if (auto width_str = vars.get(L"fish_ambiguous_width")) {
|
||||
new_width = fish_wcstol(width_str->as_string().c_str());
|
||||
|
@ -236,30 +234,23 @@ static void handle_change_ambiguous_width(const wcstring &var_name, env_stack_t
|
|||
g_fish_ambiguous_width = std::max(0, new_width);
|
||||
}
|
||||
|
||||
static void handle_term_size_change(const wcstring &var_name, env_stack_t &vars) {
|
||||
UNUSED(var_name);
|
||||
static void handle_term_size_change(env_stack_t &vars) {
|
||||
UNUSED(vars);
|
||||
invalidate_termsize(true); // force fish to update its idea of the terminal size plus vars
|
||||
}
|
||||
|
||||
static void handle_read_limit_change(const wcstring &var_name, env_stack_t &vars) {
|
||||
UNUSED(var_name);
|
||||
vars.set_read_limit();
|
||||
}
|
||||
static void handle_read_limit_change(env_stack_t &vars) { vars.set_read_limit(); }
|
||||
|
||||
static void handle_fish_history_change(const wcstring &var_name, env_stack_t &vars) {
|
||||
UNUSED(var_name);
|
||||
static void handle_fish_history_change(env_stack_t &vars) {
|
||||
reader_change_history(history_session_id(vars));
|
||||
}
|
||||
|
||||
static void handle_function_path_change(const wcstring &var_name, env_stack_t &vars) {
|
||||
UNUSED(var_name);
|
||||
static void handle_function_path_change(env_stack_t &vars) {
|
||||
UNUSED(vars);
|
||||
function_invalidate_path();
|
||||
}
|
||||
|
||||
static void handle_complete_path_change(const wcstring &var_name, env_stack_t &vars) {
|
||||
UNUSED(var_name);
|
||||
static void handle_complete_path_change(env_stack_t &vars) {
|
||||
UNUSED(vars);
|
||||
complete_invalidate_path();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue