mirror of
https://github.com/vim/vim.git
synced 2025-07-25 10:54:51 -04:00
updated for version 7.0227
This commit is contained in:
parent
ca003e1e4f
commit
f0acfce534
41
src/eval.c
41
src/eval.c
@ -370,6 +370,8 @@ static void list_glob_vars __ARGS((void));
|
|||||||
static void list_buf_vars __ARGS((void));
|
static void list_buf_vars __ARGS((void));
|
||||||
static void list_win_vars __ARGS((void));
|
static void list_win_vars __ARGS((void));
|
||||||
static void list_vim_vars __ARGS((void));
|
static void list_vim_vars __ARGS((void));
|
||||||
|
static void list_script_vars __ARGS((void));
|
||||||
|
static void list_func_vars __ARGS((void));
|
||||||
static char_u *list_arg_vars __ARGS((exarg_T *eap, char_u *arg));
|
static char_u *list_arg_vars __ARGS((exarg_T *eap, char_u *arg));
|
||||||
static char_u *ex_let_one __ARGS((char_u *arg, typval_T *tv, int copy, char_u *endchars, char_u *op));
|
static char_u *ex_let_one __ARGS((char_u *arg, typval_T *tv, int copy, char_u *endchars, char_u *op));
|
||||||
static int check_changedtick __ARGS((char_u *arg));
|
static int check_changedtick __ARGS((char_u *arg));
|
||||||
@ -463,6 +465,7 @@ static void f_bufwinnr __ARGS((typval_T *argvars, typval_T *rettv));
|
|||||||
static void f_byte2line __ARGS((typval_T *argvars, typval_T *rettv));
|
static void f_byte2line __ARGS((typval_T *argvars, typval_T *rettv));
|
||||||
static void f_byteidx __ARGS((typval_T *argvars, typval_T *rettv));
|
static void f_byteidx __ARGS((typval_T *argvars, typval_T *rettv));
|
||||||
static void f_call __ARGS((typval_T *argvars, typval_T *rettv));
|
static void f_call __ARGS((typval_T *argvars, typval_T *rettv));
|
||||||
|
static void f_changenr __ARGS((typval_T *argvars, typval_T *rettv));
|
||||||
static void f_char2nr __ARGS((typval_T *argvars, typval_T *rettv));
|
static void f_char2nr __ARGS((typval_T *argvars, typval_T *rettv));
|
||||||
static void f_cindent __ARGS((typval_T *argvars, typval_T *rettv));
|
static void f_cindent __ARGS((typval_T *argvars, typval_T *rettv));
|
||||||
static void f_col __ARGS((typval_T *argvars, typval_T *rettv));
|
static void f_col __ARGS((typval_T *argvars, typval_T *rettv));
|
||||||
@ -1676,6 +1679,8 @@ ex_let(eap)
|
|||||||
list_glob_vars();
|
list_glob_vars();
|
||||||
list_buf_vars();
|
list_buf_vars();
|
||||||
list_win_vars();
|
list_win_vars();
|
||||||
|
list_script_vars();
|
||||||
|
list_func_vars();
|
||||||
list_vim_vars();
|
list_vim_vars();
|
||||||
}
|
}
|
||||||
eap->nextcmd = check_nextcmd(arg);
|
eap->nextcmd = check_nextcmd(arg);
|
||||||
@ -1945,6 +1950,27 @@ list_vim_vars()
|
|||||||
list_hashtable_vars(&vimvarht, (char_u *)"v:", FALSE);
|
list_hashtable_vars(&vimvarht, (char_u *)"v:", FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* List script-local variables, if there is a script.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
list_script_vars()
|
||||||
|
{
|
||||||
|
if (current_SID > 0 && current_SID <= ga_scripts.ga_len)
|
||||||
|
list_hashtable_vars(&SCRIPT_VARS(current_SID), (char_u *)"s:", FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* List function variables, if there is a function.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
list_func_vars()
|
||||||
|
{
|
||||||
|
if (current_funccal != NULL)
|
||||||
|
list_hashtable_vars(¤t_funccal->l_vars.dv_hashtab,
|
||||||
|
(char_u *)"l:", FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* List variables in "arg".
|
* List variables in "arg".
|
||||||
*/
|
*/
|
||||||
@ -2012,6 +2038,8 @@ list_arg_vars(eap, arg)
|
|||||||
case 'b': list_buf_vars(); break;
|
case 'b': list_buf_vars(); break;
|
||||||
case 'w': list_win_vars(); break;
|
case 'w': list_win_vars(); break;
|
||||||
case 'v': list_vim_vars(); break;
|
case 'v': list_vim_vars(); break;
|
||||||
|
case 's': list_script_vars(); break;
|
||||||
|
case 'l': list_func_vars(); break;
|
||||||
default:
|
default:
|
||||||
EMSG2(_("E738: Can't list variables for %s"), name);
|
EMSG2(_("E738: Can't list variables for %s"), name);
|
||||||
}
|
}
|
||||||
@ -6881,6 +6909,7 @@ static struct fst
|
|||||||
{"byte2line", 1, 1, f_byte2line},
|
{"byte2line", 1, 1, f_byte2line},
|
||||||
{"byteidx", 2, 2, f_byteidx},
|
{"byteidx", 2, 2, f_byteidx},
|
||||||
{"call", 2, 3, f_call},
|
{"call", 2, 3, f_call},
|
||||||
|
{"changenr", 0, 0, f_changenr},
|
||||||
{"char2nr", 1, 1, f_char2nr},
|
{"char2nr", 1, 1, f_char2nr},
|
||||||
{"cindent", 1, 1, f_cindent},
|
{"cindent", 1, 1, f_cindent},
|
||||||
{"col", 1, 1, f_col},
|
{"col", 1, 1, f_col},
|
||||||
@ -8008,6 +8037,18 @@ f_call(argvars, rettv)
|
|||||||
clear_tv(&argv[--argc]);
|
clear_tv(&argv[--argc]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* "changenr()" function
|
||||||
|
*/
|
||||||
|
/*ARGSUSED*/
|
||||||
|
static void
|
||||||
|
f_changenr(argvars, rettv)
|
||||||
|
typval_T *argvars;
|
||||||
|
typval_T *rettv;
|
||||||
|
{
|
||||||
|
rettv->vval.v_number = curbuf->b_u_seq_cur;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* "char2nr(string)" function
|
* "char2nr(string)" function
|
||||||
*/
|
*/
|
||||||
|
@ -948,7 +948,7 @@ EX(CMD_tselect, "tselect", ex_tag,
|
|||||||
EX(CMD_tunmenu, "tunmenu", ex_menu,
|
EX(CMD_tunmenu, "tunmenu", ex_menu,
|
||||||
EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
|
EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
|
||||||
EX(CMD_undo, "undo", ex_undo,
|
EX(CMD_undo, "undo", ex_undo,
|
||||||
RANGE|NOTADR|COUNT|TRLBAR|CMDWIN),
|
RANGE|NOTADR|COUNT|ZEROR|TRLBAR|CMDWIN),
|
||||||
EX(CMD_undojoin, "undojoin", ex_undojoin,
|
EX(CMD_undojoin, "undojoin", ex_undojoin,
|
||||||
TRLBAR|CMDWIN),
|
TRLBAR|CMDWIN),
|
||||||
EX(CMD_undolist, "undolist", ex_undolist,
|
EX(CMD_undolist, "undolist", ex_undolist,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user