1
0
forked from aniani/vim

patch 8.2.3307: Vim9: :echoconsole cannot access local variables

Problem:    Vim9: :echoconsole cannot access local variables.
Solution:   Handle like other :echo commands. (closes #8708)
This commit is contained in:
Bram Moolenaar
2021-08-07 15:05:47 +02:00
parent 1b154ea121
commit 7de6262373
6 changed files with 40 additions and 10 deletions

View File

@@ -2493,10 +2493,11 @@ def Test_echomsg_cmd_vimscript()
enddef
def Test_echoerr_cmd()
var local = 'local'
try
echoerr 'something' 'wrong' # comment
echoerr 'something' local 'wrong' # comment
catch
assert_match('something wrong', v:exception)
assert_match('something local wrong', v:exception)
endtry
enddef
@@ -2515,6 +2516,12 @@ def Test_echoerr_cmd_vimscript()
CheckScriptSuccess(lines)
enddef
def Test_echoconsole_cmd()
var local = 'local'
echoconsole 'something' local # comment
# output goes anywhere
enddef
def Test_for_outside_of_function()
var lines =<< trim END
vim9script