diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-04-24 19:47:27 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-04-24 19:47:27 +0000 |
commit | f9393ef5efde2f425fbd9e19363186f8c9103376 (patch) | |
tree | ec493a8fec62c31f9fe21993c4907bf1c1f290cd /src | |
parent | 4a85b4156098a30daf5b15a7fb7587a1c7c99f94 (diff) | |
download | vim-git-f9393ef5efde2f425fbd9e19363186f8c9103376.tar.gz |
updated for version 7.0fv7.0f
Diffstat (limited to 'src')
-rw-r--r-- | src/GvimExt/GvimExt.reg | 4 | ||||
-rw-r--r-- | src/GvimExt/gvimext.h | 6 | ||||
-rw-r--r-- | src/Make_mvc.mak | 4 | ||||
-rw-r--r-- | src/Makefile | 2 | ||||
-rw-r--r-- | src/edit.c | 31 | ||||
-rw-r--r-- | src/eval.c | 125 | ||||
-rw-r--r-- | src/getchar.c | 6 | ||||
-rw-r--r-- | src/globals.h | 2 | ||||
-rw-r--r-- | src/gui_gtk_x11.c | 2 | ||||
-rw-r--r-- | src/gui_mac.c | 24 | ||||
-rw-r--r-- | src/gui_w32.c | 10 | ||||
-rw-r--r-- | src/option.c | 7 | ||||
-rw-r--r-- | src/option.h | 3 | ||||
-rw-r--r-- | src/proto/edit.pro | 78 | ||||
-rw-r--r-- | src/proto/gui.pro | 126 | ||||
-rw-r--r-- | src/proto/message.pro | 138 | ||||
-rw-r--r-- | src/proto/os_mswin.pro | 4 | ||||
-rw-r--r-- | src/quickfix.c | 30 | ||||
-rw-r--r-- | src/testdir/test55.in | 57 | ||||
-rw-r--r-- | src/testdir/test55.ok | 20 | ||||
-rw-r--r-- | src/version.h | 10 |
21 files changed, 406 insertions, 283 deletions
diff --git a/src/GvimExt/GvimExt.reg b/src/GvimExt/GvimExt.reg index 325c2e7d9..1e3a78186 100644 --- a/src/GvimExt/GvimExt.reg +++ b/src/GvimExt/GvimExt.reg @@ -15,6 +15,6 @@ REGEDIT4 [HKEY_LOCAL_MACHINE\Software\Vim\Gvim] "path"="gvim.exe" -[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Vim 7.0e] - "DisplayName"="Vim 7.0e: Edit with Vim popup menu entry" +[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Vim 7.0f] + "DisplayName"="Vim 7.0f: Edit with Vim popup menu entry" "UninstallString"="uninstal.exe" diff --git a/src/GvimExt/gvimext.h b/src/GvimExt/gvimext.h index c0e39cb17..506ab8fc9 100644 --- a/src/GvimExt/gvimext.h +++ b/src/GvimExt/gvimext.h @@ -28,7 +28,7 @@ //-------------------------------------------------------------- #ifndef STRICT -#define STRICT +# define STRICT #endif #define INC_OLE2 // WIN32, get ole2 from windows.h @@ -45,8 +45,8 @@ /* Accommodate old versions of VC that don't have a modern Platform SDK */ #if _MSC_VER < 1300 -#undef UINT_PTR -#define UINT_PTR UINT +# undef UINT_PTR +# define UINT_PTR UINT #endif #define ResultFromShort(i) ResultFromScode(MAKE_SCODE(SEVERITY_SUCCESS, 0, (USHORT)(i))) diff --git a/src/Make_mvc.mak b/src/Make_mvc.mak index a78f756ec..9c11aa0e8 100644 --- a/src/Make_mvc.mak +++ b/src/Make_mvc.mak @@ -173,6 +173,10 @@ OBJDIR = $(OBJDIR)d # We're on Windows NT or using VC 6+ ! ifdef CPU ASSEMBLY_ARCHITECTURE=$(CPU) +# Using I386 for $ASSEMBLY_ARCHITECTURE doesn't work for VC7. +! if ("$(ASSEMBLY_ARCHITECTURE)" == "i386") || ("$(ASSEMBLY_ARCHITECTURE)" == "I386") +ASSEMBLY_ARCHITECTURE = x86 +! endif ! else CPU = $(PROCESSOR_ARCHITECTURE) ASSEMBLY_ARCHITECTURE = $(PROCESSOR_ARCHITECTURE) diff --git a/src/Makefile b/src/Makefile index bbcbc1ca5..585349b5c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -880,7 +880,7 @@ MAN1DIR = /man1 ### Vim version (adjusted by a script) VIMMAJOR = 7 -VIMMINOR = 0e +VIMMINOR = 0f ### Location of Vim files (should not need to be changed, and {{{1 ### some things might not work when they are changed!) diff --git a/src/edit.c b/src/edit.c index b96380ead..25fffad58 100644 --- a/src/edit.c +++ b/src/edit.c @@ -2231,8 +2231,23 @@ ins_compl_longest_match(match) int had_match; if (compl_leader == NULL) + { /* First match, use it as a whole. */ compl_leader = vim_strsave(match->cp_str); + if (compl_leader != NULL) + { + had_match = (curwin->w_cursor.col > compl_col); + ins_compl_delete(); + ins_bytes(compl_leader + curwin->w_cursor.col - compl_col); + ins_redraw(FALSE); + + /* When the match isn't there (to avoid matching itself) remove it + * again after redrawing. */ + if (!had_match) + ins_compl_delete(); + compl_used_match = FALSE; + } + } else { /* Reduce the text if this match differs from compl_leader. */ @@ -2650,15 +2665,23 @@ ins_compl_dictionaries(dict_start, pat, flags, thesaurus) /* When invoked to match whole lines for CTRL-X CTRL-L adjust the pattern * to only match at the start of a line. Otherwise just match the - * pattern. */ + * pattern. Also need to double backslashes. */ if (ctrl_x_mode == CTRL_X_WHOLE_LINE) { - i = (int)STRLEN(pat) + 8; + char_u *pat_esc = vim_strsave_escaped(pat, (char_u *)"\\"); + + if (pat_esc == NULL) + return ; + i = (int)STRLEN(pat_esc) + 10; ptr = alloc(i); if (ptr == NULL) + { + vim_free(pat_esc); return; - vim_snprintf((char *)ptr, i, "^\\s*\\zs%s", pat); - regmatch.regprog = vim_regcomp(ptr, p_magic ? RE_MAGIC : 0); + } + vim_snprintf((char *)ptr, i, "^\\s*\\zs\\V%s", pat_esc); + regmatch.regprog = vim_regcomp(ptr, RE_MAGIC); + vim_free(pat_esc); vim_free(ptr); } else diff --git a/src/eval.c b/src/eval.c index 080278416..56e534e6d 100644 --- a/src/eval.c +++ b/src/eval.c @@ -495,6 +495,7 @@ static void f_executable __ARGS((typval_T *argvars, typval_T *rettv)); static void f_exists __ARGS((typval_T *argvars, typval_T *rettv)); static void f_expand __ARGS((typval_T *argvars, typval_T *rettv)); static void f_extend __ARGS((typval_T *argvars, typval_T *rettv)); +static void f_feedkeys __ARGS((typval_T *argvars, typval_T *rettv)); static void f_filereadable __ARGS((typval_T *argvars, typval_T *rettv)); static void f_filewritable __ARGS((typval_T *argvars, typval_T *rettv)); static void f_filter __ARGS((typval_T *argvars, typval_T *rettv)); @@ -587,7 +588,6 @@ static void f_pathshorten __ARGS((typval_T *argvars, typval_T *rettv)); static void f_prevnonblank __ARGS((typval_T *argvars, typval_T *rettv)); static void f_printf __ARGS((typval_T *argvars, typval_T *rettv)); static void f_pumvisible __ARGS((typval_T *argvars, typval_T *rettv)); -static void f_pushkeys __ARGS((typval_T *argvars, typval_T *rettv)); static void f_range __ARGS((typval_T *argvars, typval_T *rettv)); static void f_readfile __ARGS((typval_T *argvars, typval_T *rettv)); static void f_reltime __ARGS((typval_T *argvars, typval_T *rettv)); @@ -2581,8 +2581,14 @@ get_lval(name, rettv, lp, unlet, skip, quiet, fne_flags) lp->ll_li = list_find(lp->ll_list, lp->ll_n1); if (lp->ll_li == NULL) { - if (!quiet) - EMSGN(_(e_listidx), lp->ll_n1); + if (lp->ll_n1 < 0) + { + lp->ll_n1 = 0; + lp->ll_li = list_find(lp->ll_list, lp->ll_n1); + } + } + if (lp->ll_li == NULL) + { if (lp->ll_range && !lp->ll_empty2) clear_tv(&var2); return NULL; @@ -2602,11 +2608,7 @@ get_lval(name, rettv, lp, unlet, skip, quiet, fne_flags) { ni = list_find(lp->ll_list, lp->ll_n2); if (ni == NULL) - { - if (!quiet) - EMSGN(_(e_listidx), lp->ll_n2); return NULL; - } lp->ll_n2 = list_idx_of_item(lp->ll_list, ni); } @@ -2614,11 +2616,7 @@ get_lval(name, rettv, lp, unlet, skip, quiet, fne_flags) if (lp->ll_n1 < 0) lp->ll_n1 = list_idx_of_item(lp->ll_list, lp->ll_li); if (lp->ll_n2 < lp->ll_n1) - { - if (!quiet) - EMSGN(_(e_listidx), lp->ll_n2); return NULL; - } } lp->ll_tv = &lp->ll_li->li_tv; @@ -4861,9 +4859,15 @@ eval_index(arg, rettv, evaluate, verbose) n1 = len + n1; if (!empty1 && (n1 < 0 || n1 >= len)) { - if (verbose) - EMSGN(_(e_listidx), n1); - return FAIL; + /* For a range we allow invalid values and return an empty + * list. A list index out of range is an error. */ + if (!range) + { + if (verbose) + EMSGN(_(e_listidx), n1); + return FAIL; + } + n1 = len; } if (range) { @@ -4875,11 +4879,7 @@ eval_index(arg, rettv, evaluate, verbose) else if (n2 >= len) n2 = len - 1; if (!empty2 && (n2 < 0 || n2 + 1 < n1)) - { - if (verbose) - EMSGN(_(e_listidx), n2); - return FAIL; - } + n2 = -1; l = list_alloc(); if (l == NULL) return FAIL; @@ -4900,8 +4900,7 @@ eval_index(arg, rettv, evaluate, verbose) } else { - copy_tv(&list_find(rettv->vval.v_list, n1)->li_tv, - &var1); + copy_tv(&list_find(rettv->vval.v_list, n1)->li_tv, &var1); clear_tv(rettv); *rettv = var1; } @@ -7006,6 +7005,7 @@ static struct fst {"exists", 1, 1, f_exists}, {"expand", 1, 2, f_expand}, {"extend", 2, 3, f_extend}, + {"feedkeys", 1, 2, f_feedkeys}, {"file_readable", 1, 1, f_filereadable}, /* obsolete */ {"filereadable", 1, 1, f_filereadable}, {"filewritable", 1, 1, f_filewritable}, @@ -7102,7 +7102,6 @@ static struct fst {"prevnonblank", 1, 1, f_prevnonblank}, {"printf", 2, 19, f_printf}, {"pumvisible", 0, 0, f_pumvisible}, - {"pushkeys", 1, 2, f_pushkeys}, {"range", 1, 3, f_range}, {"readfile", 1, 3, f_readfile}, {"reltime", 0, 2, f_reltime}, @@ -8989,6 +8988,44 @@ f_extend(argvars, rettv) } /* + * "feedkeys()" function + */ +/*ARGSUSED*/ + static void +f_feedkeys(argvars, rettv) + typval_T *argvars; + typval_T *rettv; +{ + int remap = TRUE; + char_u *keys, *flags; + char_u nbuf[NUMBUFLEN]; + int typed = FALSE; + + rettv->vval.v_number = 0; + keys = get_tv_string(&argvars[0]); + if (*keys != NUL) + { + if (argvars[1].v_type != VAR_UNKNOWN) + { + flags = get_tv_string_buf(&argvars[1], nbuf); + for ( ; *flags != NUL; ++flags) + { + switch (*flags) + { + case 'n': remap = FALSE; break; + case 'm': remap = TRUE; break; + case 't': typed = TRUE; break; + } + } + } + + ins_typebuf(keys, (remap ? REMAP_YES : REMAP_NONE), + typebuf.tb_len, !typed, FALSE); + typebuf_was_filled = TRUE; + } +} + +/* * "filereadable()" function */ static void @@ -12173,8 +12210,12 @@ find_some_match(argvars, rettv, type) for (i = 0; i < NSUBEXP; ++i) { if (regmatch.endp[i] == NULL) - break; - if (list_append_string(rettv->vval.v_list, + { + if (list_append_string(rettv->vval.v_list, + (char_u *)"", 0) == FAIL) + break; + } + else if (list_append_string(rettv->vval.v_list, regmatch.startp[i], (int)(regmatch.endp[i] - regmatch.startp[i])) == FAIL) @@ -12621,42 +12662,6 @@ f_pumvisible(argvars, rettv) } /* - * "pushkeys()" function - */ -/*ARGSUSED*/ - static void -f_pushkeys(argvars, rettv) - typval_T *argvars; - typval_T *rettv; -{ - int remap = TRUE; - char_u *keys, *flags; - char_u nbuf[NUMBUFLEN]; - - rettv->vval.v_number = 0; - keys = get_tv_string(&argvars[0]); - if (*keys != NUL) - { - if (argvars[1].v_type != VAR_UNKNOWN) - { - flags = get_tv_string_buf(&argvars[1], nbuf); - for ( ; *flags != NUL; ++flags) - { - switch (*flags) - { - case 'n': remap = FALSE; break; - case 'm': remap = TRUE; break; - } - } - } - - ins_typebuf(keys, (remap ? REMAP_YES : REMAP_NONE), - typebuf.tb_len, TRUE, FALSE); - typebuf_was_filled = TRUE; - } -} - -/* * "range()" function */ static void diff --git a/src/getchar.c b/src/getchar.c index 89df484a2..e6ba2485d 100644 --- a/src/getchar.c +++ b/src/getchar.c @@ -1035,7 +1035,7 @@ ins_typebuf(str, noremap, offset, nottyped, silent) /* * Return TRUE if the typeahead buffer was changed (while waiting for a * character to arrive). Happens when a message was received from a client or - * from pushkeys(). + * from feedkeys(). * But check in a more generic way to avoid trouble: When "typebuf.tb_buf" * changed it was reallocated and the old pointer can no longer be used. * Or "typebuf.tb_off" may have been changed and we would overwrite characters @@ -1144,7 +1144,7 @@ del_typebuf(len, offset) } #if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL) - /* Reset the flag that text received from a client or from pushkeys() + /* Reset the flag that text received from a client or from feedkeys() * was inserted in the typeahead buffer. */ typebuf_was_filled = FALSE; #endif @@ -2918,7 +2918,7 @@ fix_input_buffer(buf, len, script) /* * Return TRUE when bytes are in the input buffer or in the typeahead buffer. * Normally the input buffer would be sufficient, but the server_to_input_buf() - * or pushkeys() may insert characters in the typeahead buffer while we are + * or feedkeys() may insert characters in the typeahead buffer while we are * waiting for input to arrive. */ int diff --git a/src/globals.h b/src/globals.h index 549287a7a..867da5bb8 100644 --- a/src/globals.h +++ b/src/globals.h @@ -1239,7 +1239,7 @@ EXTERN int echo_wid_arg INIT(= FALSE); /* --echo-wid argument */ #if defined(FEAT_CLIENTSERVER) || defined(FEAT_EVAL) EXTERN int typebuf_was_filled INIT(= FALSE); /* received text from client - or from pushkeys() */ + or from feedkeys() */ #endif #ifdef FEAT_CLIENTSERVER diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index 68c0f3e63..88559e534 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -6875,6 +6875,8 @@ mch_set_mouse_shape(int shape) } else if (shape < sizeof(mshape_ids) / sizeof(int)) id = mshape_ids[shape]; + else + return; # ifdef HAVE_GTK_MULTIHEAD c = gdk_cursor_new_for_display( gtk_widget_get_display(gui.drawarea), (GdkCursorType)id); diff --git a/src/gui_mac.c b/src/gui_mac.c index 4ebc1216f..251322407 100644 --- a/src/gui_mac.c +++ b/src/gui_mac.c @@ -3163,7 +3163,7 @@ gui_mch_exit(int rc) DisposeEventHandlerUPP(mouseWheelHandlerUPP); #ifdef USE_ATSUI_DRAWING - if (gFontStyle) + if (p_macatsui && gFontStyle) ATSUDisposeStyle(gFontStyle); #endif @@ -3321,7 +3321,7 @@ gui_mch_init_font(char_u *font_name, int fontset) char_u used_font_name[512]; #ifdef USE_ATSUI_DRAWING - if (gFontStyle == NULL) + if (p_macatsui && gFontStyle == NULL) { if (ATSUCreateStyle(&gFontStyle) != noErr) gFontStyle = NULL; @@ -3393,7 +3393,7 @@ gui_mch_init_font(char_u *font_name, int fontset) Fixed fontSize; ATSStyleRenderingOptions fontOptions; - if (gFontStyle) + if (p_macatsui && gFontStyle) { fontID = font & 0xFFFF; fontSize = Long2Fix(font >> 16); @@ -3501,7 +3501,7 @@ gui_mch_set_font(GuiFont font) Fixed fontSize; ATSStyleRenderingOptions fontOptions; - if (gFontStyle) + if (p_macatsui && gFontStyle) { /* Avoid setting same font again */ if (ATSUGetAttribute(gFontStyle, kATSUMaxATSUITagValue+1, sizeof font, @@ -3546,9 +3546,9 @@ gui_mch_set_font(GuiFont font) (sizeof attribTags)/sizeof(ATSUAttributeTag), attribTags, attribSizes, attribValues) != noErr) { -#ifndef NDEBUG +# ifndef NDEBUG fprintf(stderr, "couldn't set font style\n"); -#endif +# endif ATSUDisposeStyle(gFontStyle); gFontStyle = NULL; } @@ -3556,7 +3556,7 @@ gui_mch_set_font(GuiFont font) } - if (!gIsFontFallbackSet) + if (p_macatsui && !gIsFontFallbackSet) { /* Setup automatic font substitution. The user's guifontwide * is tried first, then the system tries other fonts. */ @@ -3834,7 +3834,6 @@ draw_undercurl(int flags, int row, int col, int cells) } } -#ifndef USE_ATSUI_DRAWING static void draw_string_QD(int row, int col, char_u *s, int len, int flags) @@ -3951,7 +3950,7 @@ draw_string_QD(int row, int col, char_u *s, int len, int flags) #endif } -#else /* USE_ATSUI_DRAWING */ +#ifdef USE_ATSUI_DRAWING static void draw_string_ATSUI(int row, int col, char_u *s, int len, int flags) @@ -4040,10 +4039,11 @@ draw_string_ATSUI(int row, int col, char_u *s, int len, int flags) gui_mch_draw_string(int row, int col, char_u *s, int len, int flags) { #if defined(USE_ATSUI_DRAWING) - draw_string_ATSUI(row, col, s, len, flags); -#else - draw_string_QD(row, col, s, len, flags); + if (p_macatsui) + draw_string_ATSUI(row, col, s, len, flags); + else #endif + draw_string_QD(row, col, s, len, flags); } /* diff --git a/src/gui_w32.c b/src/gui_w32.c index a700ac0c4..d6718798b 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -234,19 +234,23 @@ typedef struct tagNMTTDISPINFO_NEW typedef HRESULT (WINAPI* DLLGETVERSIONPROC)(DLLVERSIONINFO *); #ifndef TTM_SETMAXTIPWIDTH -# define TTM_SETMAXTIPWIDTH (WM_USER+24) +# define TTM_SETMAXTIPWIDTH (WM_USER+24) #endif #ifndef TTF_DI_SETITEM -# define TTF_DI_SETITEM 0x8000 +# define TTF_DI_SETITEM 0x8000 #endif #ifndef TTN_GETDISPINFO -# define TTN_GETDISPINFO (TTN_FIRST - 0) +# define TTN_GETDISPINFO (TTN_FIRST - 0) #endif #endif /* defined(FEAT_BEVAL) */ +#ifndef TTN_GETDISPINFOW +# define TTN_GETDISPINFOW (TTN_FIRST - 10) +#endif + /* Local variables: */ #ifdef FEAT_MENU diff --git a/src/option.c b/src/option.c index 59b84fd06..c13412438 100644 --- a/src/option.c +++ b/src/option.c @@ -1267,7 +1267,7 @@ static struct vimoption {(char_u *)NULL, (char_u *)0L} #endif }, - {"guitabtooltip", "gtl", P_STRING|P_VI_DEF|P_RWIN, + {"guitabtooltip", "gtt", P_STRING|P_VI_DEF|P_RWIN, #if defined(FEAT_GUI_TABLINE) (char_u *)&p_gtt, PV_NONE, {(char_u *)"", (char_u *)0L} @@ -1631,6 +1631,11 @@ static struct vimoption {"loadplugins", "lpl", P_BOOL|P_VI_DEF, (char_u *)&p_lpl, PV_NONE, {(char_u *)TRUE, (char_u *)0L}}, +#ifdef FEAT_GUI_MAC + {"macatsui", NULL, P_BOOL|P_VI_DEF|P_RCLR, + (char_u *)&p_macatsui, PV_NONE, + {(char_u *)TRUE, (char_u *)0L}}, +#endif {"magic", NULL, P_BOOL|P_VI_DEF, (char_u *)&p_magic, PV_NONE, {(char_u *)TRUE, (char_u *)0L}}, diff --git a/src/option.h b/src/option.h index d512a2055..28c58152e 100644 --- a/src/option.h +++ b/src/option.h @@ -581,6 +581,9 @@ EXTERN char_u *p_lcs; /* 'listchars' */ EXTERN int p_lz; /* 'lazyredraw' */ EXTERN int p_lpl; /* 'loadplugins' */ +#ifdef FEAT_GUI_MAC +EXTERN int p_macatsui; /* 'macatsui' */ +#endif EXTERN int p_magic; /* 'magic' */ #ifdef FEAT_QUICKFIX EXTERN char_u *p_mef; /* 'makeef' */ diff --git a/src/proto/edit.pro b/src/proto/edit.pro index a967037cb..3c76a9ebd 100644 --- a/src/proto/edit.pro +++ b/src/proto/edit.pro @@ -1,41 +1,41 @@ /* edit.c */ -int edit __ARGS((int cmdchar, int startln, long count)); -void edit_putchar __ARGS((int c, int highlight)); -void edit_unputchar __ARGS((void)); -void display_dollar __ARGS((colnr_T col)); -void change_indent __ARGS((int type, int amount, int round, int replaced)); -void truncate_spaces __ARGS((char_u *line)); -void backspace_until_column __ARGS((int col)); -int vim_is_ctrl_x_key __ARGS((int c)); -int ins_compl_add_infercase __ARGS((char_u *str, int len, int icase, char_u *fname, int dir, int flags)); -void set_completion __ARGS((int startcol, list_T *list)); -void ins_compl_show_pum __ARGS((void)); -char_u *find_word_start __ARGS((char_u *ptr)); -char_u *find_word_end __ARGS((char_u *ptr)); -int ins_compl_active __ARGS((void)); -int ins_compl_add_tv __ARGS((typval_T *tv, int dir)); -void ins_compl_check_keys __ARGS((int frequency)); -int get_literal __ARGS((void)); -void insertchar __ARGS((int c, int flags, int second_indent)); -void auto_format __ARGS((int trailblank, int prev_line)); -int comp_textwidth __ARGS((int ff)); -int stop_arrow __ARGS((void)); -void set_last_insert __ARGS((int c)); -void free_last_insert __ARGS((void)); -char_u *add_char2buf __ARGS((int c, char_u *s)); -void beginline __ARGS((int flags)); -int oneright __ARGS((void)); -int oneleft __ARGS((void)); -int cursor_up __ARGS((long n, int upd_topline)); -int cursor_down __ARGS((long n, int upd_topline)); -int stuff_inserted __ARGS((int c, long count, int no_esc)); -char_u *get_last_insert __ARGS((void)); -char_u *get_last_insert_save __ARGS((void)); -void replace_push __ARGS((int c)); -void fixthisline __ARGS((int (*get_the_indent)(void))); -void fix_indent __ARGS((void)); -int in_cinkeys __ARGS((int keytyped, int when, int line_is_empty)); -int hkmap __ARGS((int c)); -void ins_scroll __ARGS((void)); -void ins_horscroll __ARGS((void)); +extern int edit __ARGS((int cmdchar, int startln, long count)); +extern void edit_putchar __ARGS((int c, int highlight)); +extern void edit_unputchar __ARGS((void)); +extern void display_dollar __ARGS((colnr_T col)); +extern void change_indent __ARGS((int type, int amount, int round, int replaced)); +extern void truncate_spaces __ARGS((char_u *line)); +extern void backspace_until_column __ARGS((int col)); +extern int vim_is_ctrl_x_key __ARGS((int c)); +extern int ins_compl_add_infercase __ARGS((char_u *str, int len, int icase, char_u *fname, int dir, int flags)); +extern void set_completion __ARGS((int startcol, list_T *list)); +extern void ins_compl_show_pum __ARGS((void)); +extern char_u *find_word_start __ARGS((char_u *ptr)); +extern char_u *find_word_end __ARGS((char_u *ptr)); +extern int ins_compl_active __ARGS((void)); +extern int ins_compl_add_tv __ARGS((typval_T *tv, int dir)); +extern void ins_compl_check_keys __ARGS((int frequency)); +extern int get_literal __ARGS((void)); +extern void insertchar __ARGS((int c, int flags, int second_indent)); +extern void auto_format __ARGS((int trailblank, int prev_line)); +extern int comp_textwidth __ARGS((int ff)); +extern int stop_arrow __ARGS((void)); +extern void set_last_insert __ARGS((int c)); +extern void free_last_insert __ARGS((void)); +extern char_u *add_char2buf __ARGS((int c, char_u *s)); +extern void beginline __ARGS((int flags)); +extern int oneright __ARGS((void)); +extern int oneleft __ARGS((void)); +extern int cursor_up __ARGS((long n, int upd_topline)); +extern int cursor_down __ARGS((long n, int upd_topline)); +extern int stuff_inserted __ARGS((int c, long count, int no_esc)); +extern char_u *get_last_insert __ARGS((void)); +extern char_u *get_last_insert_save __ARGS((void)); +extern void replace_push __ARGS((int c)); +extern void fixthisline __ARGS((int (*get_the_indent)(void))); +extern void fix_indent __ARGS((void)); +extern int in_cinkeys __ARGS((int keytyped, int when, int line_is_empty)); +extern int hkmap __ARGS((int c)); +extern void ins_scroll __ARGS((void)); +extern void ins_horscroll __ARGS((void)); /* vim: set ft=c : */ diff --git a/src/proto/gui.pro b/src/proto/gui.pro index 322dc7955..aeabd42cd 100644 --- a/src/proto/gui.pro +++ b/src/proto/gui.pro @@ -1,65 +1,65 @@ /* gui.c */ -void gui_start __ARGS((void)); -void gui_prepare __ARGS((int *argc, char **argv)); -int gui_init_check __ARGS((void)); -void gui_init __ARGS((void)); -void gui_exit __ARGS((int rc)); -void gui_shell_closed __ARGS((void)); -int gui_init_font __ARGS((char_u *font_list, int fontset)); -int gui_get_wide_font __ARGS((void)); -void gui_set_cursor __ARGS((int row, int col)); -void gui_update_cursor __ARGS((int force, int clear_selection)); -void gui_position_menu __ARGS((void)); -int gui_get_base_width __ARGS((void)); -int gui_get_base_height __ARGS((void)); -void gui_resize_shell __ARGS((int pixel_width, int pixel_height)); -void gui_may_resize_shell __ARGS((void)); -int gui_get_shellsize __ARGS((void)); -void gui_set_shellsize __ARGS((int mustset, int fit_to_display, int direction)); -void gui_new_shellsize __ARGS((void)); -void gui_reset_scroll_region __ARGS((void)); -void gui_start_highlight __ARGS((int mask)); -void gui_stop_highlight __ARGS((int mask)); -void gui_clear_block __ARGS((int row1, int col1, int row2, int col2)); -void gui_update_cursor_later __ARGS((void)); -void gui_write __ARGS((char_u *s, int len)); -void gui_dont_update_cursor __ARGS((void)); -void gui_can_update_cursor __ARGS((void)); -int gui_outstr_nowrap __ARGS((char_u *s, int len, int flags, guicolor_T fg, guicolor_T bg, int back)); -void gui_undraw_cursor __ARGS((void)); -void gui_redraw __ARGS((int x, int y, int w, int h)); -int gui_redraw_block __ARGS((int row1, int col1, int row2, int col2, int flags)); -int gui_wait_for_chars __ARGS((long wtime)); -void gui_send_mouse_event __ARGS((int button, int x, int y, int repeated_click, int_u modifiers)); -int gui_xy2colrow __ARGS((int x, int y, int *colp)); -void gui_menu_cb __ARGS((vimmenu_T *menu)); -void gui_init_which_components __ARGS((char_u *oldval)); -int gui_use_tabline __ARGS((void)); -void gui_update_tabline __ARGS((void)); -void get_tabline_label __ARGS((tabpage_T *tp, int tooltip)); -int send_tabline_event __ARGS((int nr)); -void send_tabline_menu_event __ARGS((int tabidx, int event)); -void gui_remove_scrollbars __ARGS((void)); -void gui_create_scrollbar __ARGS((scrollbar_T *sb, int type, win_T *wp)); -scrollbar_T *gui_find_scrollbar __ARGS((long ident)); -void gui_drag_scrollbar __ARGS((scrollbar_T *sb, long value, int still_dragging)); -void gui_update_scrollbars __ARGS((int force)); -int gui_do_scroll __ARGS((void)); -int gui_do_horiz_scroll __ARGS((void)); -void gui_check_colors __ARGS((void)); -guicolor_T gui_get_color __ARGS((char_u *name)); -int gui_get_lightness __ARGS((guicolor_T pixel)); -void gui_new_scrollbar_colors __ARGS((void)); -void gui_focus_change __ARGS((int in_focus)); -void gui_mouse_moved __ARGS((int x, int y)); -void gui_mouse_correct __ARGS((void)); -void ex_gui __ARGS((exarg_T *eap)); -int gui_find_bitmap __ARGS((char_u *name, char_u *buffer, char *ext)); -void gui_find_iconfile __ARGS((char_u *name, char_u *buffer, char *ext)); -void display_errors __ARGS((void)); -int no_console_input __ARGS((void)); -void gui_update_screen __ARGS((void)); -char_u *get_find_dialog_text __ARGS((char_u *arg, int *wwordp, int *mcasep)); -int gui_do_findrepl __ARGS((int flags, char_u *find_text, char_u *repl_text, int down)); -void gui_handle_drop __ARGS((int x, int y, int_u modifiers, char_u **fnames, int count)); +extern void gui_start __ARGS((void)); +extern void gui_prepare __ARGS((int *argc, char **argv)); +extern int gui_init_check __ARGS((void)); +extern void gui_init __ARGS((void)); +extern void gui_exit __ARGS((int rc)); +extern void gui_shell_closed __ARGS((void)); +extern int gui_init_font __ARGS((char_u *font_list, int fontset)); +extern int gui_get_wide_font __ARGS((void)); +extern void gui_set_cursor __ARGS((int row, int col)); +extern void gui_update_cursor __ARGS((int force, int clear_selection)); +extern void gui_position_menu __ARGS((void)); +extern int gui_get_base_width __ARGS((void)); +extern int gui_get_base_height __ARGS((void)); +extern void gui_resize_shell __ARGS((int pixel_width, int pixel_height)); +extern void gui_may_resize_shell __ARGS((void)); +extern int gui_get_shellsize __ARGS((void)); +extern void gui_set_shellsize __ARGS((int mustset, int fit_to_display, int direction)); +extern void gui_new_shellsize __ARGS((void)); +extern void gui_reset_scroll_region __ARGS((void)); +extern void gui_start_highlight __ARGS((int mask)); +extern void gui_stop_highlight __ARGS((int mask)); +extern void gui_clear_block __ARGS((int row1, int col1, int row2, int col2)); +extern void gui_update_cursor_later __ARGS((void)); +extern void gui_write __ARGS((char_u *s, int len)); +extern void gui_dont_update_cursor __ARGS((void)); +extern void gui_can_update_cursor __ARGS((void)); +extern int gui_outstr_nowrap __ARGS((char_u *s, int len, int flags, guicolor_T fg, guicolor_T bg, int back)); +extern void gui_undraw_cursor __ARGS((void)); +extern void gui_redraw __ARGS((int x, int y, int w, int h)); +extern int gui_redraw_block __ARGS((int row1, int col1, int row2, int col2, int flags)); +extern int gui_wait_for_chars __ARGS((long wtime)); +extern void gui_send_mouse_event __ARGS((int button, int x, int y, int repeated_click, int_u modifiers)); +extern int gui_xy2colrow __ARGS((int x, int y, int *colp)); +extern void gui_menu_cb __ARGS((vimmenu_T *menu)); +extern void gui_init_which_components __ARGS((char_u *oldval)); +extern int gui_use_tabline __ARGS((void)); +extern void gui_update_tabline __ARGS((void)); +extern void get_tabline_label __ARGS((tabpage_T *tp, int tooltip)); +extern int send_tabline_event __ARGS((int nr)); +extern void send_tabline_menu_event __ARGS((int tabidx, int event)); +extern void gui_remove_scrollbars __ARGS((void)); +extern void gui_create_scrollbar __ARGS((scrollbar_T *sb, int type, win_T *wp)); +extern scrollbar_T *gui_find_scrollbar __ARGS((long ident)); +extern void gui_drag_scrollbar __ARGS((scrollbar_T *sb, long value, int still_dragging)); +extern void gui_update_scrollbars __ARGS((int force)); +extern int gui_do_scroll __ARGS((void)); +extern int gui_do_horiz_scroll __ARGS((void)); +extern void gui_check_colors __ARGS((void)); +extern guicolor_T gui_get_color __ARGS((char_u *name)); +extern int gui_get_lightness __ARGS((guicolor_T pixel)); +extern void gui_new_scrollbar_colors __ARGS((void)); +extern void gui_focus_change __ARGS((int in_focus)); +extern void gui_mouse_moved __ARGS((int x, int y)); +extern void gui_mouse_correct __ARGS((void)); +extern void ex_gui __ARGS((exarg_T *eap)); +extern int gui_find_bitmap __ARGS((char_u *name, char_u *buffer, char *ext)); +extern void gui_find_iconfile __ARGS((char_u *name, char_u *buffer, char *ext)); +extern void display_errors __ARGS((void)); +extern int no_console_input __ARGS((void)); +extern void gui_update_screen __ARGS((void)); +extern char_u *get_find_dialog_text __ARGS((char_u *arg, int *wwordp, int *mcasep)); +extern int gui_do_findrepl __ARGS((int flags, char_u *find_text, char_u *repl_text, int down)); +extern void gui_handle_drop __ARGS((int x, int y, int_u modifiers, char_u **fnames, int count)); /* vim: set ft=c : */ diff --git a/src/proto/message.pro b/src/proto/message.pro index cff7d6b50..e6bd3e9e2 100644 --- a/src/proto/message.pro +++ b/src/proto/message.pro @@ -1,71 +1,71 @@ /* message.c */ -int msg __ARGS((char_u *s)); -int verb_msg __ARGS((char_u *s)); -int msg_attr __ARGS((char_u *s, int attr)); -int msg_attr_keep __ARGS((char_u *s, int attr, int keep)); -char_u *msg_strtrunc __ARGS((char_u *s, int force)); -void trunc_string __ARGS((char_u *s, char_u *buf, int room)); -void reset_last_sourcing __ARGS((void)); -void msg_source __ARGS((int attr)); -int emsg_not_now __ARGS((void)); -int emsg __ARGS((char_u *s)); -int emsg2 __ARGS((char_u *s, char_u *a1)); -void emsg_invreg __ARGS((int name)); -char_u *msg_trunc_attr __ARGS((char_u *s, int force, int attr)); -char_u *msg_may_trunc __ARGS((int force, char_u *s)); -int delete_first_msg __ARGS((void)); -void ex_messages __ARGS((exarg_T *eap)); -void msg_end_prompt __ARGS((void)); -void wait_return __ARGS((int redraw)); -void set_keep_msg __ARGS((char_u *s, int attr)); -void set_keep_msg_from_hist __ARGS((void)); -void msg_start __ARGS((void)); -void msg_starthere __ARGS((void)); -void msg_putchar __ARGS((int c)); -void msg_putchar_attr __ARGS((int c, int attr)); -void msg_outnum __ARGS((long n)); -void msg_home_replace __ARGS((char_u *fname)); -void msg_home_replace_hl __ARGS((char_u *fname)); -int msg_outtrans __ARGS((char_u *str)); -int msg_outtrans_attr __ARGS((char_u *str, int attr)); -int msg_outtrans_len __ARGS((char_u *str, int len)); -char_u *msg_outtrans_one __ARGS((char_u *p, int attr)); -int msg_outtrans_len_attr __ARGS((char_u *msgstr, int len, int attr)); -void msg_make __ARGS((char_u *arg)); -int msg_outtrans_special __ARGS((char_u *strstart, int from)); -char_u *str2special __ARGS((char_u **sp, int from)); -void str2specialbuf __ARGS((char_u *sp, char_u *buf, int len)); -void msg_prt_line __ARGS((char_u *s, int list)); -void msg_puts __ARGS((char_u *s)); -void msg_puts_title __ARGS((char_u *s)); -void msg_puts_long_attr __ARGS((char_u *longstr, int attr)); -void msg_puts_long_len_attr __ARGS((char_u *longstr, int len, int attr)); -void msg_puts_attr __ARGS((char_u *s, int attr)); -void may_clear_sb_text __ARGS((void)); -void clear_sb_text __ARGS((void)); -void show_sb_text __ARGS((void)); -int msg_use_printf __ARGS((void)); -void mch_errmsg __ARGS((char *str)); -void mch_msg __ARGS((char *str)); -void msg_moremsg __ARGS((int full)); -void repeat_message __ARGS((void)); -void msg_clr_eos __ARGS((void)); -void msg_clr_eos_force __ARGS((void)); -void msg_clr_cmdline __ARGS((void)); -int msg_end __ARGS((void)); -void msg_check __ARGS((void)); -void verbose_enter __ARGS((void)); -void verbose_leave __ARGS((void)); -void verbose_enter_scroll __ARGS((void)); -void verbose_leave_scroll __ARGS((void)); -void verbose_stop __ARGS((void)); -int verbose_open __ARGS((void)); -void give_warning __ARGS((char_u *message, int hl)); -void msg_advance __ARGS((int col)); -int do_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); -void display_confirm_msg __ARGS((void)); -int vim_dialog_yesno __ARGS((int type, char_u *title, char_u *message, int dflt)); -int vim_dialog_yesnocancel __ARGS((int type, char_u *title, char_u *message, int dflt)); -int vim_dialog_yesnoallcancel __ARGS((int type, char_u *title, char_u *message, int dflt)); -char_u *do_browse __ARGS((int flags, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter, buf_T *buf)); +extern int msg __ARGS((char_u *s)); +extern int verb_msg __ARGS((char_u *s)); +extern int msg_attr __ARGS((char_u *s, int attr)); +extern int msg_attr_keep __ARGS((char_u *s, int attr, int keep)); +extern char_u *msg_strtrunc __ARGS((char_u *s, int force)); +extern void trunc_string __ARGS((char_u *s, char_u *buf, int room)); +extern void reset_last_sourcing __ARGS((void)); +extern void msg_source __ARGS((int attr)); +extern int emsg_not_now __ARGS((void)); +extern int emsg __ARGS((char_u *s)); +extern int emsg2 __ARGS((char_u *s, char_u *a1)); +extern void emsg_invreg __ARGS((int name)); +extern char_u *msg_trunc_attr __ARGS((char_u *s, int force, int attr)); +extern char_u *msg_may_trunc __ARGS((int force, char_u *s)); +extern int delete_first_msg __ARGS((void)); +extern void ex_messages __ARGS((exarg_T *eap)); +extern void msg_end_prompt __ARGS((void)); +extern void wait_return __ARGS((int redraw)); +extern void set_keep_msg __ARGS((char_u *s, int attr)); +extern void set_keep_msg_from_hist __ARGS((void)); +extern void msg_start __ARGS((void)); +extern void msg_starthere __ARGS((void)); +extern void msg_putchar __ARGS((int c)); +extern void msg_putchar_attr __ARGS((int c, int attr)); +extern void msg_outnum __ARGS((long n)); +extern void msg_home_replace __ARGS((char_u *fname)); +extern void msg_home_replace_hl __ARGS((char_u *fname)); +extern int msg_outtrans __ARGS((char_u *str)); +extern int msg_outtrans_attr __ARGS((char_u *str, int attr)); +extern int msg_outtrans_len __ARGS((char_u *str, int len)); +extern char_u *msg_outtrans_one __ARGS((char_u *p, int attr)); +extern int msg_outtrans_len_attr __ARGS((char_u *msgstr, int len, int attr)); +extern void msg_make __ARGS((char_u *arg)); +extern int msg_outtrans_special __ARGS((char_u *strstart, int from)); +extern char_u *str2special __ARGS((char_u **sp, int from)); +extern void str2specialbuf __ARGS((char_u *sp, char_u *buf, int len)); +extern void msg_prt_line __ARGS((char_u *s, int list)); +extern void msg_puts __ARGS((char_u *s)); +extern void msg_puts_title __ARGS((char_u *s)); +extern void msg_puts_long_attr __ARGS((char_u *longstr, int attr)); +extern void msg_puts_long_len_attr __ARGS((char_u *longstr, int len, int attr)); +extern void msg_puts_attr __ARGS((char_u *s, int attr)); +extern void may_clear_sb_text __ARGS((void)); +extern void clear_sb_text __ARGS((void)); +extern void show_sb_text __ARGS((void)); +extern int msg_use_printf __ARGS((void)); +extern void mch_errmsg __ARGS((char *str)); +extern void mch_msg __ARGS((char *str)); +extern void msg_moremsg __ARGS((int full)); +extern void repeat_message __ARGS((void)); +extern void msg_clr_eos __ARGS((void)); +extern void msg_clr_eos_force __ARGS((void)); +extern void msg_clr_cmdline __ARGS((void)); +extern int msg_end __ARGS((void)); +extern void msg_check __ARGS((void)); +extern void verbose_enter __ARGS((void)); +extern void verbose_leave __ARGS((void)); +extern void verbose_enter_scroll __ARGS((void)); +extern void verbose_leave_scroll __ARGS((void)); +extern void verbose_stop __ARGS((void)); +extern int verbose_open __ARGS((void)); +extern void give_warning __ARGS((char_u *message, int hl)); +extern void msg_advance __ARGS((int col)); +extern int do_dialog __ARGS((int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield)); +extern void display_confirm_msg __ARGS((void)); +extern int vim_dialog_yesno __ARGS((int type, char_u *title, char_u *message, int dflt)); +extern int vim_dialog_yesnocancel __ARGS((int type, char_u *title, char_u *message, int dflt)); +extern int vim_dialog_yesnoallcancel __ARGS((int type, char_u *title, char_u *message, int dflt)); +extern char_u *do_browse __ARGS((int flags, char_u *title, char_u *dflt, char_u *ext, char_u *initdir, char_u *filter, buf_T *buf)); /* vim: set ft=c : */ diff --git a/src/proto/os_mswin.pro b/src/proto/os_mswin.pro index f46a3f852..aaef05b1a 100644 --- a/src/proto/os_mswin.pro +++ b/src/proto/os_mswin.pro @@ -46,8 +46,8 @@ extern int mch_print_blank_page __ARGS((void)); extern void mch_print_start_line __ARGS((int margin, int page_line)); extern int mch_print_text_out __ARGS((char_u *p, int len)); extern void mch_print_set_font __ARGS((int iBold, int iItalic, int iUnderline)); -extern void mch_print_set_bg __ARGS((long_u bgcol)); -extern void mch_print_set_fg __ARGS((long_u fgcol)); +extern void mch_print_set_bg __ARGS((unsigned long bgcol)); +extern void mch_print_set_fg __ARGS((unsigned long fgcol)); extern char_u *mch_resolve_shortcut __ARGS((char_u *fname)); extern void win32_set_foreground __ARGS((void)); extern void serverInitMessaging __ARGS((void)); diff --git a/src/quickfix.c b/src/quickfix.c index 21b524ca0..739b8945b 100644 --- a/src/quickfix.c +++ b/src/quickfix.c @@ -2620,6 +2620,7 @@ ex_make(eap) unsigned len; win_T *wp = NULL; qf_info_T *qi = &ql_info; + int res; #ifdef FEAT_AUTOCMD char_u *au_name = NULL; @@ -2693,11 +2694,16 @@ ex_make(eap) (void)char_avail(); #endif - if (qf_init(wp, fname, (eap->cmdidx != CMD_make + res = qf_init(wp, fname, (eap->cmdidx != CMD_make && eap->cmdidx != CMD_lmake) ? p_gefm : p_efm, (eap->cmdidx != CMD_grepadd - && eap->cmdidx != CMD_lgrepadd)) > 0 - && !eap->forceit) + && eap->cmdidx != CMD_lgrepadd)); +#ifdef FEAT_AUTOCMD + if (au_name != NULL) + apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, + curbuf->b_fname, TRUE, curbuf); +#endif + if (res > 0 && !eap->forceit) { if (wp != NULL) qi = GET_LOC_LIST(wp); @@ -2707,12 +2713,6 @@ ex_make(eap) mch_remove(fname); vim_free(fname); vim_free(cmd); - -#ifdef FEAT_AUTOCMD - if (au_name != NULL) - apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, - curbuf->b_fname, TRUE, curbuf); -#endif } /* @@ -3168,6 +3168,12 @@ ex_vimgrep(eap) qf_update_buffer(qi); #endif +#ifdef FEAT_AUTOCMD + if (au_name != NULL) + apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, + curbuf->b_fname, TRUE, curbuf); +#endif + /* Jump to first match. */ if (qi->qf_lists[qi->qf_curlist].qf_count > 0) { @@ -3177,12 +3183,6 @@ ex_vimgrep(eap) else EMSG2(_(e_nomatch2), s); -#ifdef FEAT_AUTOCMD - if (au_name != NULL) - apply_autocmds(EVENT_QUICKFIXCMDPOST, au_name, - curbuf->b_fname, TRUE, curbuf); -#endif - theend: vim_free(regmatch.regprog); } diff --git a/src/testdir/test55.in b/src/testdir/test55.in index 5570c596e..d7cd4d91a 100644 --- a/src/testdir/test55.in +++ b/src/testdir/test55.in @@ -13,6 +13,12 @@ STARTTEST :catch : $put =v:exception[:14] :endtry +:" List slices +:$put =string(l[:]) +:$put =string(l[1:]) +:$put =string(l[:-2]) +:$put =string(l[0:8]) +:$put =string(l[8:-1]) :" :" List identity :let ll = l @@ -80,6 +86,57 @@ STARTTEST :unlet d[-1] :$put =string(d) :" +:" removing items out of range: silently skip items that don't exist +let l = [0, 1, 2, 3] +:unlet l[2:1] +:$put =string(l) +let l = [0, 1, 2, 3] +:unlet l[2:2] +:$put =string(l) +let l = [0, 1, 2, 3] +:unlet l[2:3] +:$put =string(l) +let l = [0, 1, 2, 3] +:unlet l[2:4] +:$put =string(l) +let l = [0, 1, 2, 3] +:unlet l[2:5] +:$put =string(l) +let l = [0, 1, 2, 3] +:unlet l[-1:2] +:$put =string(l) +let l = [0, 1, 2, 3] +:unlet l[-2:2] +:$put =string(l) +let l = [0, 1, 2, 3] +:unlet l[-3:2] +:$put =string(l) +let l = [0, 1, 2, 3] +:unlet l[-4:2] +:$put =string(l) +let l = [0, 1, 2, 3] +:unlet l[-5:2] +:$put =string(l) +let l = [0, 1, 2, 3] +:unlet l[-6:2] +:$put =string(l) +:" +:" assignment to a list +:let l = [0, 1, 2, 3] +:let [va, vb] = l[2:3] +:$put =va +:$put =vb +:try +: let [va, vb] = l +:catch +: $put =v:exception[:14] +:endtry +:try +: let [va, vb] = l[1:1] +:catch +: $put =v:exception[:14] +:endtry +:" :" manipulating a big Dictionary (hashtable.c has a border of 1000 entries) :let d = {} :for i in range(1500) diff --git a/src/testdir/test55.ok b/src/testdir/test55.ok index caec674bd..1f52f2955 100644 --- a/src/testdir/test55.ok +++ b/src/testdir/test55.ok @@ -3,6 +3,11 @@ start: {'a': 1} 1 Vim(put):E684: +[1, 'as''d', [1, 2, function('strlen')], {'a': 1}] +['as''d', [1, 2, function('strlen')], {'a': 1}] +[1, 'as''d', [1, 2, function('strlen')]] +[1, 'as''d', [1, 2, function('strlen')], {'a': 1}] +[] 101101 {'1': 'asd', 'b': [1, 2, function('strlen')], '-1': {'a': 1}}asd ['-1', '1', 'b'] @@ -19,6 +24,21 @@ Vim(let):E706: l [1, 'as''d', {'a': 1}] [4] {'1': 99, '3': 33} +[0, 1, 2, 3] +[0, 1, 3] +[0, 1] +[0, 1] +[0, 1] +[0, 1, 2, 3] +[0, 1, 3] +[0, 3] +[3] +[3] +[3] +2 +3 +Vim(let):E687: +Vim(let):E688: 3000 2900 2001 1600 1501 Vim(let):E716: 1500 NONE 2999 diff --git a/src/version.h b/src/version.h index e4bc3f666..faaa75598 100644 --- a/src/version.h +++ b/src/version.h @@ -33,8 +33,8 @@ * VIM_VERSION_MEDIUM is used for the startup-screen. * VIM_VERSION_LONG is used for the ":version" command and "Vim -h". */ -#define VIM_VERSION_NODOT "vim70e" -#define VIM_VERSION_SHORT "7.0e" -#define VIM_VERSION_MEDIUM "7.0e07 BETA" -#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0e07 BETA (2006 Apr 23)" -#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0e07 BETA (2006 Apr 23, compiled " +#define VIM_VERSION_NODOT "vim70f" +#define VIM_VERSION_SHORT "7.0f" +#define VIM_VERSION_MEDIUM "7.0f BETA" +#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0f BETA (2006 Apr 24)" +#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0f BETA (2006 Apr 24, compiled " |