comparison 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
comparison
equal deleted inserted replaced
27677:567f4f964ccc 27678:1646525507aa
116 lines =<< trim END 116 lines =<< trim END
117 legacy exe "import './Xvim9import.vim'" 117 legacy exe "import './Xvim9import.vim'"
118 END 118 END
119 v9.CheckScriptSuccess(lines) 119 v9.CheckScriptSuccess(lines)
120 delete('Xvim9import.vim') 120 delete('Xvim9import.vim')
121
122 # "legacy" does not aply to a called function
123 lines =<< trim END
124 vim9script
125
126 def g:TheFunc()
127 if exists('something')
128 echo 'yes'
129 endif
130 enddef
131 legacy exe 'call g:TheFunc()'
132 END
133 v9.CheckScriptSuccess(lines)
134 delfunc g:TheFunc
121 enddef 135 enddef
122 136
123 def Test_edit_wildcards() 137 def Test_edit_wildcards()
124 var filename = 'Xtest' 138 var filename = 'Xtest'
125 edit `=filename` 139 edit `=filename`