mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.0188: Check commands don't work well with Vim9 script (#21809)
Problem: Check commands don't work well with Vim9 script.
Solution: Improve constant expression handling.
7f829cab35
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
parent
9dd5903273
commit
2f32b19967
@ -1,6 +1,8 @@
|
||||
source shared.vim
|
||||
source term_util.vim
|
||||
|
||||
command -nargs=1 MissingFeature throw 'Skipped: ' .. <args> .. ' feature missing'
|
||||
|
||||
" Command to check for the presence of a feature.
|
||||
command -nargs=1 CheckFeature call CheckFeature(<f-args>)
|
||||
func CheckFeature(name)
|
||||
@ -8,7 +10,7 @@ func CheckFeature(name)
|
||||
" throw 'Checking for non-existent feature ' .. a:name
|
||||
" endif
|
||||
if !has(a:name)
|
||||
throw 'Skipped: ' .. a:name .. ' feature missing'
|
||||
MissingFeature a:name
|
||||
endif
|
||||
endfunc
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user