Change argument ordering for ‘scope_variables’

Generally we should always provide a base environment, since the scoped variables are format strings. The filtering scope selector is however optional, and we do not have one when executing commands outside an fi;e/editor context.
This commit is contained in:
Allan Odgaard
2013-05-11 19:37:18 +07:00
parent 5eaa0a9d94
commit 8b3f05485d
8 changed files with 18 additions and 16 deletions

View File

@@ -80,7 +80,7 @@ namespace ng
env << editor_variables(scopeAttributes) << item->bundle_variables();
if(_document)
env << _document->document_variables();
env = bundles::scope_variables(this->scope(scopeAttributes), env);
env = bundles::scope_variables(env, this->scope(scopeAttributes));
env = variables_for_path(_document ? _document->path() : path::home(), this->scope(scopeAttributes).right, env);
env["TM_CURRENT_WORD"] = prefix;