aboutsummaryrefslogtreecommitdiffhomepage
path: root/env.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-04-29 17:28:49 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-04-29 17:28:49 -0700
commitf30872a7b55da98c5b027edc4195441743f3bfab (patch)
treea47c0e32877b7b3a48d70e613476fb588624e9f3 /env.cpp
parent9c3a9a1e7333feacff0a7d5d08e667b346c97899 (diff)
Recalculate exported variables when universal variable is erased
Fixes #2046
Diffstat (limited to 'env.cpp')
-rw-r--r--env.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/env.cpp b/env.cpp
index 13aacf57..1a04665e 100644
--- a/env.cpp
+++ b/env.cpp
@@ -901,6 +901,7 @@ int env_remove(const wcstring &key, int var_mode)
!(var_mode & ENV_GLOBAL) &&
!(var_mode & ENV_LOCAL))
{
+ bool is_exported = uvars()->get_export(key);
erased = uvars() && uvars()->remove(key);
if (erased)
{
@@ -911,6 +912,9 @@ int env_remove(const wcstring &key, int var_mode)
ev.arguments.push_back(key);
event_fire(&ev);
}
+
+ if (is_exported)
+ mark_changed_exported();
}
react_to_variable_change(key);