mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-18 03:41:16 -03:00
Comment and test that we shouldn't copy for blocks
Seems important.
This commit is contained in:
committed by
Kurtis Rader
parent
c1ea9c7025
commit
427b8f5c52
@@ -183,6 +183,8 @@ void var_stack_t::push(bool new_scope) {
|
||||
|
||||
// Copy local-exported variables
|
||||
auto top_node = top.get();
|
||||
// Only if we introduce a new shadowing scope
|
||||
// i.e. not if it's just `begin; end` or "--no-scope-shadowing".
|
||||
if (new_scope) {
|
||||
if (!(top_node == this->global_env)) {
|
||||
for (auto& var : top_node->env) {
|
||||
|
||||
Reference in New Issue
Block a user