From 24a56cca308621a5a585f73b22e5421461318b3d Mon Sep 17 00:00:00 2001 From: erw7 Date: Wed, 6 Mar 2019 14:59:28 +0900 Subject: Fix environment variable on Windows Since uv_os_setenv uses SetEnvironmentVariableW, _wenviron is no updated. As a result, inconsistency occurs in completion of environment variable names. Change to use GetEnvironmentStaringsW instead of _wenviron to solve it. --- test/functional/ui/wildmode_spec.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test') diff --git a/test/functional/ui/wildmode_spec.lua b/test/functional/ui/wildmode_spec.lua index 7cd09fb222..8a56699cca 100644 --- a/test/functional/ui/wildmode_spec.lua +++ b/test/functional/ui/wildmode_spec.lua @@ -201,6 +201,22 @@ describe('command line completion', function() ]]) end) + it('completes env var names', function() + clear() + screen:attach() + command('let $XTEST_1 = "foo" | let $XTEST_2 = "bar"') + command('set wildmode=full') + command('set wildmenu') + feed(':!echo $XTEST_') + screen:expect([[ + | + {1:~ }| + {1:~ }| + {2:XTEST_1}{3: XTEST_2 }| + :!echo $XTEST_1^ | + ]]) + end) + it('completes (multibyte) env var names #9655', function() clear({env={ ['XTEST_1AaあB']='foo', -- cgit