# HG changeset patch # User vimboss # Date 1110237608 0 # Node ID a1f18bd133d6e3ea075018576584e5555bf25fdc # Parent 504c627f74741091a6d66405c1358d10e9032d46 updated for version 7.0057 diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 7.0aa. Last change: 2005 Feb 20 +*pattern.txt* For Vim version 7.0aa. Last change: 2005 Mar 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -272,7 +272,7 @@ the "*" is under your right hand middle ============================================================================== 2. The definition of a pattern *search-pattern* *pattern* *[pattern]* *regular-expression* *regexp* *Pattern* - *E76* *E361* *E363* *E383* *E476* + *E76* *E383* *E476* For starters, read chapter 27 of the user manual |usr_27.txt|. diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim --- a/runtime/syntax/tex.vim +++ b/runtime/syntax/tex.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: TeX " Maintainer: Dr. Charles E. Campbell, Jr. -" Last Change: Oct 13, 2004 -" Version: 26 +" Last Change: Mar 02, 2005 +" Version: 27 " URL: http://www.erols.com/astronaut/vim/index.html#vimlinks_syntax " " Notes: {{{1 @@ -53,7 +53,7 @@ if exists("g:tex_tex") && !exists("g:tex let g:tex_no_error= 1 endif -" Determine whether or not to use "*.sty" mode +" Determine whether or not to use "*.sty" mode {{{1 " The user may override the normal determination by setting " g:tex_stylish to 1 (for "*.sty" mode) " or to 0 else (normal "*.tex" mode) @@ -69,6 +69,18 @@ elseif !exists("b:tex_stylish") endif endif +" handle folding {{{1 +if !exists("g:tex_fold_enabled") + let g:tex_fold_enabled= 0 +elseif g:tex_fold_enabled && !has("folding") + let g:sh_fold_enabled= 0; + echomsg "Ignoring g:tex_fold_enabled=".g:tex_fold_enabled."; need to re-compile vim for +fold support" +endif +if g:tex_fold_enabled && &fdm == "manual" + set fdm=syntax +endif + + " (La)TeX keywords: only use the letters a-zA-Z {{{1 " but _ is the only one that causes problems. if version < 600 @@ -233,19 +245,9 @@ syn match texSpaceCode "\\\(math\|cat\| syn match texSpaceCodeChar "`\\\=.\(\^.\)\==\(\d\|\"\x\{1,6}\|`.\)" contained " Sections, subsections, etc: {{{1 -if exists("tex_dosynfolds") && has("folding") - " COMBAK -- this folding doesn't work as expected as yet - syn region Red matchgroup=texSection start="\\section\*\=\>" end="\\\%(sub\)*\%(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>"me=s end="%\s*stopzone\>" fold -" syn region Red matchgroup=texSection start="\\section\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" end="%\s*stopzone\>" contains=TOP fold -" syn region Blue matchgroup=texSection start="\\subsection\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" contains=TOP fold -" syn region texSectionZone matchgroup=texSection start="\\subsubsection\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" contains=TOP fold -" syn region texSectionZone matchgroup=texSection start="\\title\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" contains=TOP fold -" syn region texSectionZone matchgroup=texSection start="\\author\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" contains=TOP fold -" syn region texSectionZone matchgroup=texSection start="\\part\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" contains=TOP fold -" syn region texSectionZone matchgroup=texSection start="\\chapter\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" contains=TOP fold -" syn region texSectionZone matchgroup=texSection start="\\paragraph\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" contains=TOP fold -" syn region texSectionZone matchgroup=texSection start="\\subparagraph\*\=\>" end="\ze\\\(sub\)*\(abstract\|section\|author\|part\|chapter\|paragraph\|subparagraph\)\*\=\>" contains=TOP fold -" syn region texSectionZone matchgroup=texSection start="\\begin\s*{\s*abstract\s*}" end="\\end\s*{\s*abstract\s*}" contains=TOP fold +if g:tex_fold_enabled && has("folding") + syn region texSectionZone matchgroup=texSection start="\\\(sub\)*\(section\|author\|part\|chapter\|paragraph\)\*\=\>" end="\ze\\\(sub\)*\(section\|author\|part\|chapter\|paragraph\)\*\=\>" end="%\s*stopzone\>" contains=TOP fold + syn region texSectionZone matchgroup=texSection start="\\begin\s*{\s*abstract\s*}" end="\\end\s*{\s*abstract\s*}" contains=TOP fold else syn match texSection "\\\(sub\)*section\*\=\>" syn match texSection "\\\(title\|author\|part\|chapter\|paragraph\|subparagraph\)\>" diff --git a/src/globals.h b/src/globals.h --- a/src/globals.h +++ b/src/globals.h @@ -1070,6 +1070,13 @@ EXTERN int stl_syntax INIT(= 0); EXTERN int no_hlsearch INIT(= FALSE); #endif +#ifdef FEAT_BEVAL +EXTERN BalloonEval *balloonEval INIT(= NULL); +EXTERN int bevalServers INIT(= 0); +# define BEVAL_NETBEANS 0x01 +# define BEVAL_WORKSHOP 0x02 +#endif + #ifdef CURSOR_SHAPE /* the table is in misc2.c, because of initializations */ extern cursorentry_T shape_table[SHAPE_IDX_COUNT]; @@ -1412,12 +1419,7 @@ EXTERN char_u e_nbreadonly[] INIT(=N_("E #if defined(FEAT_EVAL) || defined(FEAT_SYN_HL) || defined(PROTO) EXTERN char_u e_intern2[] INIT(=N_("E685: Internal error: %s")); #endif -#if 0 -#if defined(HAVE_SETJMP_H) || defined(HAVE_TRY_EXCEPT) || defined(__MINGW32__) -EXTERN char_u e_complex[] INIT(=N_("E361: Crash intercepted; regexp too complex?")); -#endif -#endif -EXTERN char_u e_outofstack[] INIT(=N_("E363: pattern caused out-of-stack error")); +EXTERN char_u e_maxmempat[] INIT(=N_("E363: pattern uses more memory than 'maxmempattern'")); EXTERN char_u e_emptybuf[] INIT(=N_("E749: empty buffer")); #ifdef MACOS_X_UNIX diff --git a/src/option.c b/src/option.c --- a/src/option.c +++ b/src/option.c @@ -448,12 +448,14 @@ static struct vimoption {"balloondelay","bdlay",P_NUM|P_VI_DEF, (char_u *)&p_bdlay, PV_NONE, {(char_u *)600L, (char_u *)0L}}, -#endif -#if defined(FEAT_BEVAL) && (defined(FEAT_SUN_WORKSHOP) \ - || defined(FEAT_NETBEANS_INTG)) {"ballooneval", "beval",P_BOOL|P_VI_DEF|P_NO_MKRC, (char_u *)&p_beval, PV_NONE, - {(char_u*)FALSE, (char_u *)0L}}, + {(char_u *)FALSE, (char_u *)0L}}, +# ifdef FEAT_EVAL + {"balloonexpr", "bexpr", P_STRING|P_ALLOCED|P_VI_DEF|P_VIM, + (char_u *)&p_bexpr, PV_NONE, + {(char_u *)"", (char_u *)0L}}, +# endif #endif {"beautify", "bf", P_BOOL|P_VI_DEF, (char_u *)NULL, PV_NONE, @@ -1479,6 +1481,9 @@ static struct vimoption {"maxmem", "mm", P_NUM|P_VI_DEF, (char_u *)&p_mm, PV_NONE, {(char_u *)DFLT_MAXMEM, (char_u *)0L}}, + {"maxmempattern","mmp", P_NUM|P_VI_DEF, + (char_u *)&p_mmp, PV_NONE, + {(char_u *)1000L, (char_u *)0L}}, {"maxmemtot", "mmt", P_NUM|P_VI_DEF, (char_u *)&p_mmt, PV_NONE, {(char_u *)DFLT_MAXMEMTOT, (char_u *)0L}}, @@ -5522,10 +5527,14 @@ did_set_string_option(opt_idx, varp, new /* 'ttymouse' */ else if (varp == &p_ttym) { + /* Switch the mouse off before changing the escape sequences used for + * that. */ + mch_setmouse(FALSE); if (opt_strings_flags(p_ttym, p_ttym_values, &ttym_flags, FALSE) != OK) errmsg = e_invarg; else check_mouse_termcode(); + setmouse(); /* may switch it on again */ } #endif @@ -6551,24 +6560,23 @@ set_bool_option(opt_idx, varp, value, op p_wiv = (*T_XS != NUL); } -#if defined(FEAT_BEVAL) && (defined(FEAT_SUN_WORKSHOP) \ - || defined(FEAT_NETBEANS_INTG)) +#ifdef FEAT_BEVAL else if ((int *)varp == &p_beval) { - extern BalloonEval *balloonEval; - if (p_beval == TRUE) gui_mch_enable_beval_area(balloonEval); else gui_mch_disable_beval_area(balloonEval); } +# if defined(FEAT_NETBEANS_INTG) || defined(FEAT_SUN_WORKSHOP) else if ((int *)varp == &p_acd) { if (p_acd && curbuf->b_ffname != NULL && vim_chdirfile(curbuf->b_ffname) == OK) shorten_fnames(TRUE); } +# endif #endif #ifdef FEAT_DIFF diff --git a/src/option.h b/src/option.h --- a/src/option.h +++ b/src/option.h @@ -339,8 +339,9 @@ EXTERN char_u *p_bsk; /* 'backupskip' * #endif #ifdef FEAT_BEVAL EXTERN long p_bdlay; /* 'balloondelay' */ -# if defined(FEAT_SUN_WORKSHOP) || defined(FEAT_NETBEANS_INTG) EXTERN int p_beval; /* 'ballooneval' */ +# ifdef FEAT_EVAL +EXTERN char_u *p_bexpr; # endif #endif #ifdef FEAT_BROWSE @@ -586,6 +587,7 @@ EXTERN long p_mfd; /* 'maxfuncdepth' */ #endif EXTERN long p_mmd; /* 'maxmapdepth' */ EXTERN long p_mm; /* 'maxmem' */ +EXTERN long p_mmp; /* 'maxmempattern' */ EXTERN long p_mmt; /* 'maxmemtot' */ #ifdef FEAT_MENU EXTERN long p_mis; /* 'menuitems' */ diff --git a/src/proto/term.pro b/src/proto/term.pro --- a/src/proto/term.pro +++ b/src/proto/term.pro @@ -44,7 +44,7 @@ void term_cursor_shape __ARGS((void)); void scroll_region_set __ARGS((win_T *wp, int off)); void scroll_region_reset __ARGS((void)); void clear_termcodes __ARGS((void)); -void add_termcode __ARGS((char_u *name, char_u *string, int use_8bit)); +void add_termcode __ARGS((char_u *name, char_u *string, int flags)); char_u *find_termcode __ARGS((char_u *name)); char_u *get_termcode __ARGS((int i)); void del_termcode __ARGS((char_u *name));