mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 09:48:19 +00:00
eval,*: Move get_tv_string to typval.c
Function was renamed and changed to return `const char *`.
This commit is contained in:
@@ -2075,7 +2075,6 @@ static void op_colon(oparg_T *oap)
|
||||
*/
|
||||
static void op_function(oparg_T *oap)
|
||||
{
|
||||
char_u *(argv[1]);
|
||||
int save_virtual_op = virtual_op;
|
||||
|
||||
if (*p_opfunc == NUL)
|
||||
@@ -2089,16 +2088,16 @@ static void op_function(oparg_T *oap)
|
||||
decl(&curbuf->b_op_end);
|
||||
}
|
||||
|
||||
if (oap->motion_type == kMTBlockWise) {
|
||||
argv[0] = (char_u *)"block";
|
||||
} else if (oap->motion_type == kMTLineWise) {
|
||||
argv[0] = (char_u *)"line";
|
||||
} else {
|
||||
argv[0] = (char_u *)"char";
|
||||
}
|
||||
const char_u *const argv[1] = {
|
||||
(const char_u *)(((const char *const[]) {
|
||||
[kMTBlockWise] = "block",
|
||||
[kMTLineWise] = "line",
|
||||
[kMTCharWise] = "char",
|
||||
})[oap->motion_type]),
|
||||
};
|
||||
|
||||
/* Reset virtual_op so that 'virtualedit' can be changed in the
|
||||
* function. */
|
||||
// Reset virtual_op so that 'virtualedit' can be changed in the
|
||||
// function.
|
||||
virtual_op = MAYBE;
|
||||
|
||||
(void)call_func_retnr(p_opfunc, 1, argv, false);
|
||||
@@ -4757,7 +4756,7 @@ static void nv_ident(cmdarg_T *cap)
|
||||
ptr = vim_strnsave(ptr, n);
|
||||
if (kp_ex) {
|
||||
// Escape the argument properly for an Ex command
|
||||
p = vim_strsave_fnameescape(ptr, false);
|
||||
p = (char_u *)vim_strsave_fnameescape((const char *)ptr, false);
|
||||
} else {
|
||||
// Escape the argument properly for a shell command
|
||||
p = vim_strsave_shellescape(ptr, true, true);
|
||||
|
Reference in New Issue
Block a user