|
Karsten Hopp |
9c7135 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
9c7135 |
Subject: patch 7.1.089
|
|
Karsten Hopp |
9c7135 |
Fcc: outbox
|
|
Karsten Hopp |
9c7135 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
9c7135 |
Mime-Version: 1.0
|
|
Karsten Hopp |
9c7135 |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
9c7135 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
9c7135 |
------------
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
Patch 7.1.089
|
|
Karsten Hopp |
9c7135 |
Problem: ":let loaded_getscriptPlugin" doesn't clear to eol, result is
|
|
Karsten Hopp |
9c7135 |
"#1in".
|
|
Karsten Hopp |
9c7135 |
Solution: Clear to the end of the screen after displaying the first variable
|
|
Karsten Hopp |
9c7135 |
value.
|
|
Karsten Hopp |
9c7135 |
Files: src/eval.c
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
*** ../vim-7.1.088/src/eval.c Tue Aug 14 22:40:13 2007
|
|
Karsten Hopp |
9c7135 |
--- src/eval.c Wed Aug 29 22:40:15 2007
|
|
Karsten Hopp |
9c7135 |
***************
|
|
Karsten Hopp |
9c7135 |
*** 369,385 ****
|
|
Karsten Hopp |
9c7135 |
static int ex_let_vars __ARGS((char_u *arg, typval_T *tv, int copy, int semicolon, int var_count, char_u *nextchars));
|
|
Karsten Hopp |
9c7135 |
static char_u *skip_var_list __ARGS((char_u *arg, int *var_count, int *semicolon));
|
|
Karsten Hopp |
9c7135 |
static char_u *skip_var_one __ARGS((char_u *arg));
|
|
Karsten Hopp |
9c7135 |
! static void list_hashtable_vars __ARGS((hashtab_T *ht, char_u *prefix, int empty));
|
|
Karsten Hopp |
9c7135 |
! static void list_glob_vars __ARGS((void));
|
|
Karsten Hopp |
9c7135 |
! static void list_buf_vars __ARGS((void));
|
|
Karsten Hopp |
9c7135 |
! static void list_win_vars __ARGS((void));
|
|
Karsten Hopp |
9c7135 |
#ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
9c7135 |
! static void list_tab_vars __ARGS((void));
|
|
Karsten Hopp |
9c7135 |
#endif
|
|
Karsten Hopp |
9c7135 |
! static void list_vim_vars __ARGS((void));
|
|
Karsten Hopp |
9c7135 |
! static void list_script_vars __ARGS((void));
|
|
Karsten Hopp |
9c7135 |
! static void list_func_vars __ARGS((void));
|
|
Karsten Hopp |
9c7135 |
! static char_u *list_arg_vars __ARGS((exarg_T *eap, char_u *arg));
|
|
Karsten Hopp |
9c7135 |
static char_u *ex_let_one __ARGS((char_u *arg, typval_T *tv, int copy, char_u *endchars, char_u *op));
|
|
Karsten Hopp |
9c7135 |
static int check_changedtick __ARGS((char_u *arg));
|
|
Karsten Hopp |
9c7135 |
static char_u *get_lval __ARGS((char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int quiet, int fne_flags));
|
|
Karsten Hopp |
9c7135 |
--- 369,385 ----
|
|
Karsten Hopp |
9c7135 |
static int ex_let_vars __ARGS((char_u *arg, typval_T *tv, int copy, int semicolon, int var_count, char_u *nextchars));
|
|
Karsten Hopp |
9c7135 |
static char_u *skip_var_list __ARGS((char_u *arg, int *var_count, int *semicolon));
|
|
Karsten Hopp |
9c7135 |
static char_u *skip_var_one __ARGS((char_u *arg));
|
|
Karsten Hopp |
9c7135 |
! static void list_hashtable_vars __ARGS((hashtab_T *ht, char_u *prefix, int empty, int *first));
|
|
Karsten Hopp |
9c7135 |
! static void list_glob_vars __ARGS((int *first));
|
|
Karsten Hopp |
9c7135 |
! static void list_buf_vars __ARGS((int *first));
|
|
Karsten Hopp |
9c7135 |
! static void list_win_vars __ARGS((int *first));
|
|
Karsten Hopp |
9c7135 |
#ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
9c7135 |
! static void list_tab_vars __ARGS((int *first));
|
|
Karsten Hopp |
9c7135 |
#endif
|
|
Karsten Hopp |
9c7135 |
! static void list_vim_vars __ARGS((int *first));
|
|
Karsten Hopp |
9c7135 |
! static void list_script_vars __ARGS((int *first));
|
|
Karsten Hopp |
9c7135 |
! static void list_func_vars __ARGS((int *first));
|
|
Karsten Hopp |
9c7135 |
! static char_u *list_arg_vars __ARGS((exarg_T *eap, char_u *arg, int *first));
|
|
Karsten Hopp |
9c7135 |
static char_u *ex_let_one __ARGS((char_u *arg, typval_T *tv, int copy, char_u *endchars, char_u *op));
|
|
Karsten Hopp |
9c7135 |
static int check_changedtick __ARGS((char_u *arg));
|
|
Karsten Hopp |
9c7135 |
static char_u *get_lval __ARGS((char_u *name, typval_T *rettv, lval_T *lp, int unlet, int skip, int quiet, int fne_flags));
|
|
Karsten Hopp |
9c7135 |
***************
|
|
Karsten Hopp |
9c7135 |
*** 704,711 ****
|
|
Karsten Hopp |
9c7135 |
static hashtab_T *find_var_ht __ARGS((char_u *name, char_u **varname));
|
|
Karsten Hopp |
9c7135 |
static void vars_clear_ext __ARGS((hashtab_T *ht, int free_val));
|
|
Karsten Hopp |
9c7135 |
static void delete_var __ARGS((hashtab_T *ht, hashitem_T *hi));
|
|
Karsten Hopp |
9c7135 |
! static void list_one_var __ARGS((dictitem_T *v, char_u *prefix));
|
|
Karsten Hopp |
9c7135 |
! static void list_one_var_a __ARGS((char_u *prefix, char_u *name, int type, char_u *string));
|
|
Karsten Hopp |
9c7135 |
static void set_var __ARGS((char_u *name, typval_T *varp, int copy));
|
|
Karsten Hopp |
9c7135 |
static int var_check_ro __ARGS((int flags, char_u *name));
|
|
Karsten Hopp |
9c7135 |
static int var_check_fixed __ARGS((int flags, char_u *name));
|
|
Karsten Hopp |
9c7135 |
--- 704,711 ----
|
|
Karsten Hopp |
9c7135 |
static hashtab_T *find_var_ht __ARGS((char_u *name, char_u **varname));
|
|
Karsten Hopp |
9c7135 |
static void vars_clear_ext __ARGS((hashtab_T *ht, int free_val));
|
|
Karsten Hopp |
9c7135 |
static void delete_var __ARGS((hashtab_T *ht, hashitem_T *hi));
|
|
Karsten Hopp |
9c7135 |
! static void list_one_var __ARGS((dictitem_T *v, char_u *prefix, int *first));
|
|
Karsten Hopp |
9c7135 |
! static void list_one_var_a __ARGS((char_u *prefix, char_u *name, int type, char_u *string, int *first));
|
|
Karsten Hopp |
9c7135 |
static void set_var __ARGS((char_u *name, typval_T *varp, int copy));
|
|
Karsten Hopp |
9c7135 |
static int var_check_ro __ARGS((int flags, char_u *name));
|
|
Karsten Hopp |
9c7135 |
static int var_check_fixed __ARGS((int flags, char_u *name));
|
|
Karsten Hopp |
9c7135 |
***************
|
|
Karsten Hopp |
9c7135 |
*** 1699,1704 ****
|
|
Karsten Hopp |
9c7135 |
--- 1699,1705 ----
|
|
Karsten Hopp |
9c7135 |
int semicolon = 0;
|
|
Karsten Hopp |
9c7135 |
char_u op[2];
|
|
Karsten Hopp |
9c7135 |
char_u *argend;
|
|
Karsten Hopp |
9c7135 |
+ int first = TRUE;
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
argend = skip_var_list(arg, &var_count, &semicolon);
|
|
Karsten Hopp |
9c7135 |
if (argend == NULL)
|
|
Karsten Hopp |
9c7135 |
***************
|
|
Karsten Hopp |
9c7135 |
*** 1715,1733 ****
|
|
Karsten Hopp |
9c7135 |
EMSG(_(e_invarg));
|
|
Karsten Hopp |
9c7135 |
else if (!ends_excmd(*arg))
|
|
Karsten Hopp |
9c7135 |
/* ":let var1 var2" */
|
|
Karsten Hopp |
9c7135 |
! arg = list_arg_vars(eap, arg);
|
|
Karsten Hopp |
9c7135 |
else if (!eap->skip)
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
/* ":let" */
|
|
Karsten Hopp |
9c7135 |
! list_glob_vars();
|
|
Karsten Hopp |
9c7135 |
! list_buf_vars();
|
|
Karsten Hopp |
9c7135 |
! list_win_vars();
|
|
Karsten Hopp |
9c7135 |
#ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
9c7135 |
! list_tab_vars();
|
|
Karsten Hopp |
9c7135 |
#endif
|
|
Karsten Hopp |
9c7135 |
! list_script_vars();
|
|
Karsten Hopp |
9c7135 |
! list_func_vars();
|
|
Karsten Hopp |
9c7135 |
! list_vim_vars();
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
eap->nextcmd = check_nextcmd(arg);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
--- 1716,1734 ----
|
|
Karsten Hopp |
9c7135 |
EMSG(_(e_invarg));
|
|
Karsten Hopp |
9c7135 |
else if (!ends_excmd(*arg))
|
|
Karsten Hopp |
9c7135 |
/* ":let var1 var2" */
|
|
Karsten Hopp |
9c7135 |
! arg = list_arg_vars(eap, arg, &first);
|
|
Karsten Hopp |
9c7135 |
else if (!eap->skip)
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
/* ":let" */
|
|
Karsten Hopp |
9c7135 |
! list_glob_vars(&first);
|
|
Karsten Hopp |
9c7135 |
! list_buf_vars(&first);
|
|
Karsten Hopp |
9c7135 |
! list_win_vars(&first);
|
|
Karsten Hopp |
9c7135 |
#ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
9c7135 |
! list_tab_vars(&first);
|
|
Karsten Hopp |
9c7135 |
#endif
|
|
Karsten Hopp |
9c7135 |
! list_script_vars(&first);
|
|
Karsten Hopp |
9c7135 |
! list_func_vars(&first);
|
|
Karsten Hopp |
9c7135 |
! list_vim_vars(&first);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
eap->nextcmd = check_nextcmd(arg);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
***************
|
|
Karsten Hopp |
9c7135 |
*** 1932,1941 ****
|
|
Karsten Hopp |
9c7135 |
* If "empty" is TRUE also list NULL strings as empty strings.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_hashtable_vars(ht, prefix, empty)
|
|
Karsten Hopp |
9c7135 |
hashtab_T *ht;
|
|
Karsten Hopp |
9c7135 |
char_u *prefix;
|
|
Karsten Hopp |
9c7135 |
int empty;
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
hashitem_T *hi;
|
|
Karsten Hopp |
9c7135 |
dictitem_T *di;
|
|
Karsten Hopp |
9c7135 |
--- 1933,1943 ----
|
|
Karsten Hopp |
9c7135 |
* If "empty" is TRUE also list NULL strings as empty strings.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_hashtable_vars(ht, prefix, empty, first)
|
|
Karsten Hopp |
9c7135 |
hashtab_T *ht;
|
|
Karsten Hopp |
9c7135 |
char_u *prefix;
|
|
Karsten Hopp |
9c7135 |
int empty;
|
|
Karsten Hopp |
9c7135 |
+ int *first;
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
hashitem_T *hi;
|
|
Karsten Hopp |
9c7135 |
dictitem_T *di;
|
|
Karsten Hopp |
9c7135 |
***************
|
|
Karsten Hopp |
9c7135 |
*** 1950,1956 ****
|
|
Karsten Hopp |
9c7135 |
di = HI2DI(hi);
|
|
Karsten Hopp |
9c7135 |
if (empty || di->di_tv.v_type != VAR_STRING
|
|
Karsten Hopp |
9c7135 |
|| di->di_tv.vval.v_string != NULL)
|
|
Karsten Hopp |
9c7135 |
! list_one_var(di, prefix);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
--- 1952,1958 ----
|
|
Karsten Hopp |
9c7135 |
di = HI2DI(hi);
|
|
Karsten Hopp |
9c7135 |
if (empty || di->di_tv.v_type != VAR_STRING
|
|
Karsten Hopp |
9c7135 |
|| di->di_tv.vval.v_string != NULL)
|
|
Karsten Hopp |
9c7135 |
! list_one_var(di, prefix, first);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
***************
|
|
Karsten Hopp |
9c7135 |
*** 1959,1990 ****
|
|
Karsten Hopp |
9c7135 |
* List global variables.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_glob_vars()
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
! list_hashtable_vars(&globvarht, (char_u *)"", TRUE);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
/*
|
|
Karsten Hopp |
9c7135 |
* List buffer variables.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_buf_vars()
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
char_u numbuf[NUMBUFLEN];
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
! list_hashtable_vars(&curbuf->b_vars.dv_hashtab, (char_u *)"b:", TRUE);
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
sprintf((char *)numbuf, "%ld", (long)curbuf->b_changedtick);
|
|
Karsten Hopp |
9c7135 |
! list_one_var_a((char_u *)"b:", (char_u *)"changedtick", VAR_NUMBER, numbuf);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
/*
|
|
Karsten Hopp |
9c7135 |
* List window variables.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_win_vars()
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
! list_hashtable_vars(&curwin->w_vars.dv_hashtab, (char_u *)"w:", TRUE);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
#ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
9c7135 |
--- 1961,1998 ----
|
|
Karsten Hopp |
9c7135 |
* List global variables.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_glob_vars(first)
|
|
Karsten Hopp |
9c7135 |
! int *first;
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
! list_hashtable_vars(&globvarht, (char_u *)"", TRUE, first);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
/*
|
|
Karsten Hopp |
9c7135 |
* List buffer variables.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_buf_vars(first)
|
|
Karsten Hopp |
9c7135 |
! int *first;
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
char_u numbuf[NUMBUFLEN];
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
! list_hashtable_vars(&curbuf->b_vars.dv_hashtab, (char_u *)"b:",
|
|
Karsten Hopp |
9c7135 |
! TRUE, first);
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
sprintf((char *)numbuf, "%ld", (long)curbuf->b_changedtick);
|
|
Karsten Hopp |
9c7135 |
! list_one_var_a((char_u *)"b:", (char_u *)"changedtick", VAR_NUMBER,
|
|
Karsten Hopp |
9c7135 |
! numbuf, first);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
/*
|
|
Karsten Hopp |
9c7135 |
* List window variables.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_win_vars(first)
|
|
Karsten Hopp |
9c7135 |
! int *first;
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
! list_hashtable_vars(&curwin->w_vars.dv_hashtab,
|
|
Karsten Hopp |
9c7135 |
! (char_u *)"w:", TRUE, first);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
#ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
9c7135 |
***************
|
|
Karsten Hopp |
9c7135 |
*** 1992,2000 ****
|
|
Karsten Hopp |
9c7135 |
* List tab page variables.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_tab_vars()
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
! list_hashtable_vars(&curtab->tp_vars.dv_hashtab, (char_u *)"t:", TRUE);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
#endif
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
--- 2000,2010 ----
|
|
Karsten Hopp |
9c7135 |
* List tab page variables.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_tab_vars(first)
|
|
Karsten Hopp |
9c7135 |
! int *first;
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
! list_hashtable_vars(&curtab->tp_vars.dv_hashtab,
|
|
Karsten Hopp |
9c7135 |
! (char_u *)"t:", TRUE, first);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
#endif
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
***************
|
|
Karsten Hopp |
9c7135 |
*** 2002,2040 ****
|
|
Karsten Hopp |
9c7135 |
* List Vim variables.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_vim_vars()
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
! list_hashtable_vars(&vimvarht, (char_u *)"v:", FALSE);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
/*
|
|
Karsten Hopp |
9c7135 |
* List script-local variables, if there is a script.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_script_vars()
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
if (current_SID > 0 && current_SID <= ga_scripts.ga_len)
|
|
Karsten Hopp |
9c7135 |
! list_hashtable_vars(&SCRIPT_VARS(current_SID), (char_u *)"s:", FALSE);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
/*
|
|
Karsten Hopp |
9c7135 |
* List function variables, if there is a function.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_func_vars()
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
if (current_funccal != NULL)
|
|
Karsten Hopp |
9c7135 |
list_hashtable_vars(¤t_funccal->l_vars.dv_hashtab,
|
|
Karsten Hopp |
9c7135 |
! (char_u *)"l:", FALSE);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
/*
|
|
Karsten Hopp |
9c7135 |
* List variables in "arg".
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static char_u *
|
|
Karsten Hopp |
9c7135 |
! list_arg_vars(eap, arg)
|
|
Karsten Hopp |
9c7135 |
exarg_T *eap;
|
|
Karsten Hopp |
9c7135 |
char_u *arg;
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
int error = FALSE;
|
|
Karsten Hopp |
9c7135 |
int len;
|
|
Karsten Hopp |
9c7135 |
--- 2012,2055 ----
|
|
Karsten Hopp |
9c7135 |
* List Vim variables.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_vim_vars(first)
|
|
Karsten Hopp |
9c7135 |
! int *first;
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
! list_hashtable_vars(&vimvarht, (char_u *)"v:", FALSE, first);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
/*
|
|
Karsten Hopp |
9c7135 |
* List script-local variables, if there is a script.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_script_vars(first)
|
|
Karsten Hopp |
9c7135 |
! int *first;
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
if (current_SID > 0 && current_SID <= ga_scripts.ga_len)
|
|
Karsten Hopp |
9c7135 |
! list_hashtable_vars(&SCRIPT_VARS(current_SID),
|
|
Karsten Hopp |
9c7135 |
! (char_u *)"s:", FALSE, first);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
/*
|
|
Karsten Hopp |
9c7135 |
* List function variables, if there is a function.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_func_vars(first)
|
|
Karsten Hopp |
9c7135 |
! int *first;
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
if (current_funccal != NULL)
|
|
Karsten Hopp |
9c7135 |
list_hashtable_vars(¤t_funccal->l_vars.dv_hashtab,
|
|
Karsten Hopp |
9c7135 |
! (char_u *)"l:", FALSE, first);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
/*
|
|
Karsten Hopp |
9c7135 |
* List variables in "arg".
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static char_u *
|
|
Karsten Hopp |
9c7135 |
! list_arg_vars(eap, arg, first)
|
|
Karsten Hopp |
9c7135 |
exarg_T *eap;
|
|
Karsten Hopp |
9c7135 |
char_u *arg;
|
|
Karsten Hopp |
9c7135 |
+ int *first;
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
int error = FALSE;
|
|
Karsten Hopp |
9c7135 |
int len;
|
|
Karsten Hopp |
9c7135 |
***************
|
|
Karsten Hopp |
9c7135 |
*** 2091,2105 ****
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
switch (*name)
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
! case 'g': list_glob_vars(); break;
|
|
Karsten Hopp |
9c7135 |
! case 'b': list_buf_vars(); break;
|
|
Karsten Hopp |
9c7135 |
! case 'w': list_win_vars(); break;
|
|
Karsten Hopp |
9c7135 |
#ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
9c7135 |
! case 't': list_tab_vars(); break;
|
|
Karsten Hopp |
9c7135 |
#endif
|
|
Karsten Hopp |
9c7135 |
! case 'v': list_vim_vars(); break;
|
|
Karsten Hopp |
9c7135 |
! case 's': list_script_vars(); break;
|
|
Karsten Hopp |
9c7135 |
! case 'l': list_func_vars(); break;
|
|
Karsten Hopp |
9c7135 |
default:
|
|
Karsten Hopp |
9c7135 |
EMSG2(_("E738: Can't list variables for %s"), name);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
--- 2106,2120 ----
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
switch (*name)
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
! case 'g': list_glob_vars(first); break;
|
|
Karsten Hopp |
9c7135 |
! case 'b': list_buf_vars(first); break;
|
|
Karsten Hopp |
9c7135 |
! case 'w': list_win_vars(first); break;
|
|
Karsten Hopp |
9c7135 |
#ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
9c7135 |
! case 't': list_tab_vars(first); break;
|
|
Karsten Hopp |
9c7135 |
#endif
|
|
Karsten Hopp |
9c7135 |
! case 'v': list_vim_vars(first); break;
|
|
Karsten Hopp |
9c7135 |
! case 's': list_script_vars(first); break;
|
|
Karsten Hopp |
9c7135 |
! case 'l': list_func_vars(first); break;
|
|
Karsten Hopp |
9c7135 |
default:
|
|
Karsten Hopp |
9c7135 |
EMSG2(_("E738: Can't list variables for %s"), name);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
***************
|
|
Karsten Hopp |
9c7135 |
*** 2116,2122 ****
|
|
Karsten Hopp |
9c7135 |
*arg = NUL;
|
|
Karsten Hopp |
9c7135 |
list_one_var_a((char_u *)"",
|
|
Karsten Hopp |
9c7135 |
arg == arg_subsc ? name : name_start,
|
|
Karsten Hopp |
9c7135 |
! tv.v_type, s == NULL ? (char_u *)"" : s);
|
|
Karsten Hopp |
9c7135 |
*arg = c;
|
|
Karsten Hopp |
9c7135 |
vim_free(tf);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
--- 2131,2139 ----
|
|
Karsten Hopp |
9c7135 |
*arg = NUL;
|
|
Karsten Hopp |
9c7135 |
list_one_var_a((char_u *)"",
|
|
Karsten Hopp |
9c7135 |
arg == arg_subsc ? name : name_start,
|
|
Karsten Hopp |
9c7135 |
! tv.v_type,
|
|
Karsten Hopp |
9c7135 |
! s == NULL ? (char_u *)"" : s,
|
|
Karsten Hopp |
9c7135 |
! first);
|
|
Karsten Hopp |
9c7135 |
*arg = c;
|
|
Karsten Hopp |
9c7135 |
vim_free(tf);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
***************
|
|
Karsten Hopp |
9c7135 |
*** 18001,18009 ****
|
|
Karsten Hopp |
9c7135 |
* List the value of one internal variable.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_one_var(v, prefix)
|
|
Karsten Hopp |
9c7135 |
dictitem_T *v;
|
|
Karsten Hopp |
9c7135 |
char_u *prefix;
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
char_u *tofree;
|
|
Karsten Hopp |
9c7135 |
char_u *s;
|
|
Karsten Hopp |
9c7135 |
--- 18024,18033 ----
|
|
Karsten Hopp |
9c7135 |
* List the value of one internal variable.
|
|
Karsten Hopp |
9c7135 |
*/
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_one_var(v, prefix, first)
|
|
Karsten Hopp |
9c7135 |
dictitem_T *v;
|
|
Karsten Hopp |
9c7135 |
char_u *prefix;
|
|
Karsten Hopp |
9c7135 |
+ int *first;
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
char_u *tofree;
|
|
Karsten Hopp |
9c7135 |
char_u *s;
|
|
Karsten Hopp |
9c7135 |
***************
|
|
Karsten Hopp |
9c7135 |
*** 18011,18026 ****
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
s = echo_string(&v->di_tv, &tofree, numbuf, ++current_copyID);
|
|
Karsten Hopp |
9c7135 |
list_one_var_a(prefix, v->di_key, v->di_tv.v_type,
|
|
Karsten Hopp |
9c7135 |
! s == NULL ? (char_u *)"" : s);
|
|
Karsten Hopp |
9c7135 |
vim_free(tofree);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_one_var_a(prefix, name, type, string)
|
|
Karsten Hopp |
9c7135 |
char_u *prefix;
|
|
Karsten Hopp |
9c7135 |
char_u *name;
|
|
Karsten Hopp |
9c7135 |
int type;
|
|
Karsten Hopp |
9c7135 |
char_u *string;
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
/* don't use msg() or msg_attr() to avoid overwriting "v:statusmsg" */
|
|
Karsten Hopp |
9c7135 |
msg_start();
|
|
Karsten Hopp |
9c7135 |
--- 18035,18051 ----
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
s = echo_string(&v->di_tv, &tofree, numbuf, ++current_copyID);
|
|
Karsten Hopp |
9c7135 |
list_one_var_a(prefix, v->di_key, v->di_tv.v_type,
|
|
Karsten Hopp |
9c7135 |
! s == NULL ? (char_u *)"" : s, first);
|
|
Karsten Hopp |
9c7135 |
vim_free(tofree);
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
static void
|
|
Karsten Hopp |
9c7135 |
! list_one_var_a(prefix, name, type, string, first)
|
|
Karsten Hopp |
9c7135 |
char_u *prefix;
|
|
Karsten Hopp |
9c7135 |
char_u *name;
|
|
Karsten Hopp |
9c7135 |
int type;
|
|
Karsten Hopp |
9c7135 |
char_u *string;
|
|
Karsten Hopp |
9c7135 |
+ int *first; /* when TRUE clear rest of screen and set to FALSE */
|
|
Karsten Hopp |
9c7135 |
{
|
|
Karsten Hopp |
9c7135 |
/* don't use msg() or msg_attr() to avoid overwriting "v:statusmsg" */
|
|
Karsten Hopp |
9c7135 |
msg_start();
|
|
Karsten Hopp |
9c7135 |
***************
|
|
Karsten Hopp |
9c7135 |
*** 18052,18057 ****
|
|
Karsten Hopp |
9c7135 |
--- 18077,18087 ----
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
if (type == VAR_FUNC)
|
|
Karsten Hopp |
9c7135 |
msg_puts((char_u *)"()");
|
|
Karsten Hopp |
9c7135 |
+ if (*first)
|
|
Karsten Hopp |
9c7135 |
+ {
|
|
Karsten Hopp |
9c7135 |
+ msg_clr_eos();
|
|
Karsten Hopp |
9c7135 |
+ *first = FALSE;
|
|
Karsten Hopp |
9c7135 |
+ }
|
|
Karsten Hopp |
9c7135 |
}
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
/*
|
|
Karsten Hopp |
9c7135 |
*** ../vim-7.1.088/src/version.c Thu Aug 30 10:34:19 2007
|
|
Karsten Hopp |
9c7135 |
--- src/version.c Thu Aug 30 11:06:32 2007
|
|
Karsten Hopp |
9c7135 |
***************
|
|
Karsten Hopp |
9c7135 |
*** 668,669 ****
|
|
Karsten Hopp |
9c7135 |
--- 668,671 ----
|
|
Karsten Hopp |
9c7135 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
9c7135 |
+ /**/
|
|
Karsten Hopp |
9c7135 |
+ 89,
|
|
Karsten Hopp |
9c7135 |
/**/
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
--
|
|
Karsten Hopp |
9c7135 |
Edison's greatest achievement came in 1879, when he invented the
|
|
Karsten Hopp |
9c7135 |
electric company. Edison's design was a brilliant adaptation of the
|
|
Karsten Hopp |
9c7135 |
simple electrical circuit: the electric company sends electricity
|
|
Karsten Hopp |
9c7135 |
through a wire to a customer, then immediately gets the electricity
|
|
Karsten Hopp |
9c7135 |
back through another wire
|
|
Karsten Hopp |
9c7135 |
|
|
Karsten Hopp |
9c7135 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
9c7135 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
9c7135 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
9c7135 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|