mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 01:08:20 +00:00
vim-patch:8.1.53 use typval_T in the caller of call_vim_function
Problem: unreliable types for complete function arguments Solution: fix argument type for functions w/ unreliable type conversion(Ozaki Kiichi) vim/vim#2993
This commit is contained in:
@@ -2096,13 +2096,15 @@ static void op_function(oparg_T *oap)
|
||||
decl(&curbuf->b_op_end);
|
||||
}
|
||||
|
||||
const char_u *const argv[1] = {
|
||||
(const char_u *)(((const char *const[]) {
|
||||
typval_T argv[2];
|
||||
argv[0].v_type = VAR_STRING;
|
||||
argv[1].v_type = VAR_UNKNOWN;
|
||||
argv[0].vval.v_string =
|
||||
(char_u *)(((const char *const[]) {
|
||||
[kMTBlockWise] = "block",
|
||||
[kMTLineWise] = "line",
|
||||
[kMTCharWise] = "char",
|
||||
})[oap->motion_type]),
|
||||
};
|
||||
})[oap->motion_type]);
|
||||
|
||||
// Reset virtual_op so that 'virtualedit' can be changed in the
|
||||
// function.
|
||||
|
Reference in New Issue
Block a user