diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-01-26 22:25:15 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-01-26 22:25:15 +0000 |
commit | 17c7c011706af19bb736c6815375f3b67a5646fc (patch) | |
tree | f18193165ae4f561a81459393e8d18083a0cf8fb /src | |
parent | 51156d5a87f433b72ca6f082e4a99fc91ca5a8dc (diff) |
updated for version 7.0188v7.0188
Diffstat (limited to 'src')
-rw-r--r-- | src/eval.c | 97 | ||||
-rw-r--r-- | src/proto/quickfix.pro | 4 | ||||
-rw-r--r-- | src/quickfix.c | 20 | ||||
-rw-r--r-- | src/term.c | 4 | ||||
-rw-r--r-- | src/version.c | 5 | ||||
-rw-r--r-- | src/version.h | 4 |
6 files changed, 111 insertions, 23 deletions
diff --git a/src/eval.c b/src/eval.c index e93182f87d..47fccbca9f 100644 --- a/src/eval.c +++ b/src/eval.c @@ -517,6 +517,7 @@ static void f_getfsize __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getftime __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getftype __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getline __ARGS((typval_T *argvars, typval_T *rettv)); +static void f_getloclist __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getqflist __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getreg __ARGS((typval_T *argvars, typval_T *rettv)); static void f_getregtype __ARGS((typval_T *argvars, typval_T *rettv)); @@ -595,6 +596,7 @@ static void f_serverlist __ARGS((typval_T *argvars, typval_T *rettv)); static void f_setbufvar __ARGS((typval_T *argvars, typval_T *rettv)); static void f_setcmdpos __ARGS((typval_T *argvars, typval_T *rettv)); static void f_setline __ARGS((typval_T *argvars, typval_T *rettv)); +static void f_setloclist __ARGS((typval_T *argvars, typval_T *rettv)); static void f_setqflist __ARGS((typval_T *argvars, typval_T *rettv)); static void f_setreg __ARGS((typval_T *argvars, typval_T *rettv)); static void f_setwinvar __ARGS((typval_T *argvars, typval_T *rettv)); @@ -704,6 +706,7 @@ static void func_unref __ARGS((char_u *name)); static void func_ref __ARGS((char_u *name)); static void call_user_func __ARGS((ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rettv, linenr_T firstline, linenr_T lastline, dict_T *selfdict)); static void add_nr_var __ARGS((dict_T *dp, dictitem_T *v, char *name, varnumber_T nr)); +static win_T *find_win_by_nr __ARGS((typval_T *vp)); /* Character used as separated in autoload function/variable names. */ #define AUTOLOAD_CHAR '#' @@ -6863,6 +6866,7 @@ static struct fst {"getftime", 1, 1, f_getftime}, {"getftype", 1, 1, f_getftype}, {"getline", 1, 2, f_getline}, + {"getloclist", 1, 1, f_getloclist}, {"getqflist", 0, 0, f_getqflist}, {"getreg", 0, 2, f_getreg}, {"getregtype", 0, 1, f_getregtype}, @@ -6943,6 +6947,7 @@ static struct fst {"setbufvar", 3, 3, f_setbufvar}, {"setcmdpos", 1, 1, f_setcmdpos}, {"setline", 2, 2, f_setline}, + {"setloclist", 2, 3, f_setloclist}, {"setqflist", 1, 2, f_setqflist}, {"setreg", 2, 3, f_setreg}, {"setwinvar", 3, 3, f_setwinvar}, @@ -9790,13 +9795,14 @@ f_getline(argvars, rettv) get_buffer_lines(curbuf, lnum, end, retlist, rettv); } +static void get_qf_ll_ist __ARGS((win_T *wp, typval_T *rettv)); + /* - * "getqflist()" function + * Shared by getqflist() and getloclist() functions */ -/*ARGSUSED*/ static void -f_getqflist(argvars, rettv) - typval_T *argvars; +get_qf_ll_ist(wp, rettv) + win_T *wp; typval_T *rettv; { #ifdef FEAT_QUICKFIX @@ -9811,9 +9817,40 @@ f_getqflist(argvars, rettv) rettv->vval.v_list = l; rettv->v_type = VAR_LIST; ++l->lv_refcount; - (void)get_errorlist(l); + (void)get_errorlist(wp, l); } #endif + +} + +/* + * "getloclist()" function + */ +/*ARGSUSED*/ + static void +f_getloclist(argvars, rettv) + typval_T *argvars; + typval_T *rettv; +{ + win_T *win; + + rettv->vval.v_number = FALSE; + + win = find_win_by_nr(&argvars[0]); + if (win != NULL) + get_qf_ll_ist(win, rettv); +} + +/* + * "getqflist()" function + */ +/*ARGSUSED*/ + static void +f_getqflist(argvars, rettv) + typval_T *argvars; + typval_T *rettv; +{ + get_qf_ll_ist(NULL, rettv); } /* @@ -9937,8 +9974,6 @@ f_getwinposy(argvars, rettv) #endif } -static win_T *find_win_by_nr __ARGS((typval_T *vp)); - static win_T * find_win_by_nr(vp) typval_T *vp; @@ -13571,12 +13606,14 @@ f_setline(argvars, rettv) } /* - * "setqflist()" function + * Used by "setqflist()" and "setloclist()" functions */ /*ARGSUSED*/ static void -f_setqflist(argvars, rettv) - typval_T *argvars; +set_qf_ll_list(wp, list_arg, action_arg, rettv) + win_T *wp; + typval_T *list_arg; + typval_T *action_arg; typval_T *rettv; { #ifdef FEAT_QUICKFIX @@ -13587,28 +13624,58 @@ f_setqflist(argvars, rettv) rettv->vval.v_number = -1; #ifdef FEAT_QUICKFIX - if (argvars[0].v_type != VAR_LIST) + if (list_arg->v_type != VAR_LIST) EMSG(_(e_listreq)); else { - list_T *l = argvars[0].vval.v_list; + list_T *l = list_arg->vval.v_list; - if (argvars[1].v_type == VAR_STRING) + if (action_arg->v_type == VAR_STRING) { - act = get_tv_string_chk(&argvars[1]); + act = get_tv_string_chk(action_arg); if (act == NULL) return; /* type error; errmsg already given */ if (*act == 'a' || *act == 'r') action = *act; } - if (l != NULL && set_errorlist(l, action) == OK) + if (l != NULL && set_errorlist(wp, l, action) == OK) rettv->vval.v_number = 0; } #endif } /* + * "setloclist()" function + */ +/*ARGSUSED*/ + static void +f_setloclist(argvars, rettv) + typval_T *argvars; + typval_T *rettv; +{ + win_T *win; + + rettv->vval.v_number = -1; + + win = find_win_by_nr(&argvars[0]); + if (win != NULL) + set_qf_ll_list(win, &argvars[1], &argvars[2], rettv); +} + +/* + * "setqflist()" function + */ +/*ARGSUSED*/ + static void +f_setqflist(argvars, rettv) + typval_T *argvars; + typval_T *rettv; +{ + set_qf_ll_list(NULL, &argvars[0], &argvars[1], rettv); +} + +/* * "setreg()" function */ static void diff --git a/src/proto/quickfix.pro b/src/proto/quickfix.pro index 4ea4f01d49..152f9064f6 100644 --- a/src/proto/quickfix.pro +++ b/src/proto/quickfix.pro @@ -21,8 +21,8 @@ void ex_cnext __ARGS((exarg_T *eap)); void ex_cfile __ARGS((exarg_T *eap)); void ex_vimgrep __ARGS((exarg_T *eap)); char_u *skip_vimgrep_pat __ARGS((char_u *p, char_u **s, int *flags)); -int get_errorlist __ARGS((list_T *list)); -int set_errorlist __ARGS((list_T *list, int action)); +int get_errorlist __ARGS((win_T *wp, list_T *list)); +int set_errorlist __ARGS((win_T *wp, list_T *list, int action)); void ex_cbuffer __ARGS((exarg_T *eap)); void ex_cexpr __ARGS((exarg_T *eap)); void ex_helpgrep __ARGS((exarg_T *eap)); diff --git a/src/quickfix.c b/src/quickfix.c index 923c7fda0b..ff3e4ce09a 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -3248,7 +3248,8 @@ unload_dummy_buffer(buf) * Add each quickfix error to list "list" as a dictionary. */ int -get_errorlist(list) +get_errorlist(wp, list) + win_T *wp; list_T *list; { qf_info_T *qi = &ql_info; @@ -3257,6 +3258,13 @@ get_errorlist(list) qfline_T *qfp; int i; + if (wp != NULL) + { + qi = GET_LOC_LIST(wp); + if (qi == NULL) + return FAIL; + } + if (qi->qf_curlist >= qi->qf_listcount || qi->qf_lists[qi->qf_curlist].qf_count == 0) return FAIL; @@ -3292,7 +3300,8 @@ get_errorlist(list) * of dictionaries. */ int -set_errorlist(list, action) +set_errorlist(wp, list, action) + win_T *wp; list_T *list; int action; { @@ -3307,6 +3316,13 @@ set_errorlist(list, action) int retval = OK; qf_info_T *qi = &ql_info; + if (wp != NULL) + { + qi = ll_get_or_alloc_list(curwin); + if (qi == NULL) + return FAIL; + } + if (action == ' ' || qi->qf_curlist == qi->qf_listcount) /* make place for a new list */ qf_new_list(qi); diff --git a/src/term.c b/src/term.c index 1f27533681..2dbe555734 100644 --- a/src/term.c +++ b/src/term.c @@ -3446,13 +3446,13 @@ term_cursor_shape() if (State & INSERT) { if (showing_insert_mode != TRUE) - out_str(T_CSI); /* disable cursor */ + out_str(T_CSI); /* Insert mode cursor */ showing_insert_mode = TRUE; } else { if (showing_insert_mode != FALSE) - out_str(T_CEI); /* disable cursor */ + out_str(T_CEI); /* non-Insert mode cursor */ showing_insert_mode = FALSE; } } diff --git a/src/version.c b/src/version.c index f14734813a..e9150d514c 100644 --- a/src/version.c +++ b/src/version.c @@ -144,6 +144,11 @@ static char *(features[]) = #else "-cscope", #endif +#ifdef CURSOR_SHAPE + "+cursorshape", +#else + "-cursorshape", +#endif #if defined(FEAT_CON_DIALOG) && defined(FEAT_GUI_DIALOG) "+dialog_con_gui", #else diff --git a/src/version.h b/src/version.h index 569cb6e804..522ec90018 100644 --- a/src/version.h +++ b/src/version.h @@ -36,5 +36,5 @@ #define VIM_VERSION_NODOT "vim70aa" #define VIM_VERSION_SHORT "7.0aa" #define VIM_VERSION_MEDIUM "7.0aa ALPHA" -#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Jan 25)" -#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Jan 25, compiled " +#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Jan 26)" +#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Jan 26, compiled " |