mirror of
https://github.com/neovim/neovim.git
synced 2025-12-13 10:02:49 +00:00
vim-patch:9.0.0057: has('patch-xxx') returns true
Problem: has('patch-xxx') returns true.
Solution: Check for digit. (closes vim/vim#10751)
5154a88800
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -2813,7 +2813,7 @@ static void f_has(typval_T *argvars, typval_T *rettv, EvalFuncData fptr)
|
|||||||
&& (minor < VIM_VERSION_MINOR
|
&& (minor < VIM_VERSION_MINOR
|
||||||
|| (minor == VIM_VERSION_MINOR
|
|| (minor == VIM_VERSION_MINOR
|
||||||
&& has_vim_patch(atoi(name + 10))))));
|
&& has_vim_patch(atoi(name + 10))))));
|
||||||
} else {
|
} else if (ascii_isdigit(name[5])) {
|
||||||
n = has_vim_patch(atoi(name + 5));
|
n = has_vim_patch(atoi(name + 5));
|
||||||
}
|
}
|
||||||
} else if (STRNICMP(name, "nvim-", 5) == 0) {
|
} else if (STRNICMP(name, "nvim-", 5) == 0) {
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ func Test_version()
|
|||||||
call assert_false(has('patch-7.4.'))
|
call assert_false(has('patch-7.4.'))
|
||||||
call assert_false(has('patch-9.1.0'))
|
call assert_false(has('patch-9.1.0'))
|
||||||
call assert_false(has('patch-9.9.1'))
|
call assert_false(has('patch-9.9.1'))
|
||||||
|
call assert_false(has('patch-abc'))
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_op_ternary()
|
func Test_op_ternary()
|
||||||
|
|||||||
Reference in New Issue
Block a user