mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-18 08:32:45 +08:00
env_stack_t::set_termsize to operate on self, not global stack
This commit is contained in:
parent
064324984b
commit
229ead9b8a
|
@ -1220,12 +1220,11 @@ void env_stack_t::set_last_statuses(statuses_t s) {
|
|||
/// defaults. They will be updated later by the `get_current_winsize()` function if they need to be
|
||||
/// adjusted.
|
||||
void env_stack_t::set_termsize() {
|
||||
auto &vars = env_stack_t::globals();
|
||||
auto cols = get(L"COLUMNS");
|
||||
if (cols.missing_or_empty()) vars.set_one(L"COLUMNS", ENV_GLOBAL, DFLT_TERM_COL_STR);
|
||||
if (cols.missing_or_empty()) set_one(L"COLUMNS", ENV_GLOBAL, DFLT_TERM_COL_STR);
|
||||
|
||||
auto rows = get(L"LINES");
|
||||
if (rows.missing_or_empty()) vars.set_one(L"LINES", ENV_GLOBAL, DFLT_TERM_ROW_STR);
|
||||
if (rows.missing_or_empty()) set_one(L"LINES", ENV_GLOBAL, DFLT_TERM_ROW_STR);
|
||||
}
|
||||
|
||||
/// Update the PWD variable directory from the result of getcwd().
|
||||
|
|
Loading…
Reference in New Issue
Block a user