Mercurial > vim
diff src/testdir/test_vim9_cmd.vim @ 27678:1646525507aa v8.2.4365
patch 8.2.4365: sticky command modifiers are too sticky
Commit: https://github.com/vim/vim/commit/cdf04859699bdde891b5b52ea821d0bebd7e8ee0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 12 22:13:06 2022 +0000
patch 8.2.4365: sticky command modifiers are too sticky
Problem: sticky command modifiers are too sticky.
Solution: Do not apply command modifiers to a called function. (closes https://github.com/vim/vim/issues/9751)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 12 Feb 2022 23:15:03 +0100 |
parents | 5c4ab8d4472c |
children | 4097434c7c67 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_cmd.vim +++ b/src/testdir/test_vim9_cmd.vim @@ -118,6 +118,20 @@ def Test_cmdmod_execute() END v9.CheckScriptSuccess(lines) delete('Xvim9import.vim') + + # "legacy" does not aply to a called function + lines =<< trim END + vim9script + + def g:TheFunc() + if exists('something') + echo 'yes' + endif + enddef + legacy exe 'call g:TheFunc()' + END + v9.CheckScriptSuccess(lines) + delfunc g:TheFunc enddef def Test_edit_wildcards()