From 229ead9b8a434e61679aeaf452856acb14f679fd Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sun, 7 Jun 2020 12:57:34 -0700 Subject: [PATCH] env_stack_t::set_termsize to operate on self, not global stack --- src/env.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/env.cpp b/src/env.cpp index fd985c818..67debe426 100644 --- a/src/env.cpp +++ b/src/env.cpp @@ -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().