summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2006-03-01 22:09:21 +0000
committervimboss <devnull@localhost>2006-03-01 22:09:21 +0000
commitb6fece131bb1983bfeded71e75bafc5570cf0270 (patch)
tree16e61ca0dbcc0ffeb10a3fb5072842144ca9f89d
parent32a9ca3f85d762c0827230e63e8a2b952c5e9aba (diff)
downloadvim-b6fece131bb1983bfeded71e75bafc5570cf0270.tar.gz
updated for version 7.0211
-rw-r--r--runtime/doc/options.txt24
-rw-r--r--runtime/doc/pattern.txt33
-rw-r--r--runtime/doc/pi_paren.txt6
-rw-r--r--runtime/doc/spell.txt47
-rw-r--r--runtime/doc/starting.txt9
-rw-r--r--runtime/doc/syntax.txt8
-rw-r--r--runtime/doc/tags4
-rw-r--r--runtime/doc/tips.txt4
-rw-r--r--runtime/doc/windows.txt9
-rw-r--r--runtime/filetype.vim5
-rw-r--r--runtime/syntax/tex.vim13
-rw-r--r--src/INSTALLmac.txt19
-rwxr-xr-xsrc/auto/configure2
-rw-r--r--src/configure.in4
-rw-r--r--src/ops.c4
-rw-r--r--src/option.c7
-rw-r--r--src/option.h1
-rw-r--r--src/screen.c108
-rw-r--r--src/search.c3
-rw-r--r--src/structs.h4
-rw-r--r--src/syntax.c2
-rw-r--r--src/term.c1
-rw-r--r--src/testdir/test59.in6
-rw-r--r--src/version.h4
24 files changed, 195 insertions, 132 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 72ab3e3d..9483f0d7 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -1,4 +1,4 @@
-*options.txt* For Vim version 7.0aa. Last change: 2006 Feb 28
+*options.txt* For Vim version 7.0aa. Last change: 2006 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -4012,8 +4012,8 @@ A jump table for the options with a short description can be found at |Q_op|.
specified with multi-byte characters (e.g., UTF-8), but only the lower
8 bits of each character will be used.
- Example (for Greek): *greek* >
- :set langmap=A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,QQ,R,S,T,U,V,WW,X,Y,Z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,qq,r,s,t,u,v,w,x,y,z
+ Example (for Greek, in UTF-8): *greek* >
+ :set langmap=ΑA,ΒB,ΨC,ΔD,ΕE,ΦF,ΓG,ΗH,ΙI,ΞJ,ΚK,ΛL,ΜM,ΝN,ΟO,ΠP,QQ,ΡR,ΣS,ΤT,ΘU,ΩV,WW,ΧX,ΥY,ΖZ,αa,βb,ψc,δd,εe,φf,γg,ηh,ιi,ξj,κk,λl,μm,νn,οo,πp,qq,ρr,σs,τt,θu,ωv,ςw,χx,υy,ζz
< Example (exchanges meaning of z and y for commands): >
:set langmap=zy,yz,ZY,YZ
<
@@ -5691,7 +5691,9 @@ A jump table for the options with a short description can be found at |Q_op|.
The 'matchpairs' option can be used to specify the characters to show
matches for. 'rightleft' and 'revins' are used to look for opposite
matches.
- Note: For the use of the short form parental guidance is advised.
+ Also see the matchparen plugin for highlighting the match when moving
+ around |pi_paren.txt|.
+ Note: Use of the short form is rated PG.
*'showmode'* *'smd'* *'noshowmode'* *'nosmd'*
'showmode' 'smd' boolean (Vim default: on, Vi default: off)
@@ -6291,7 +6293,7 @@ A jump table for the options with a short description can be found at |Q_op|.
'S' flag in 'cpoptions'.
Only normal file name characters can be used, "/\*?[|<>" are illegal.
- *'tabline'* *'tal'*
+ *'tabline'* *'tal'*
'tabline' 'tal' string (default empty)
global
{not in Vi}
@@ -6315,7 +6317,17 @@ A jump table for the options with a short description can be found at |Q_op|.
are invisible and you can't jump to their windows.
- *'tabstop'* *'ts'*
+ *'tabpagemax'* *'tpm'*
+'tabpagemax' 'tpm' number (default 10)
+ global
+ {not in Vi}
+ {not available when compiled without the +windows
+ feature}
+ Maximum number of tab pages to be opened by the |-p| command line
+ argument or the ":tab all" command. |tabpage|
+
+
+ *'tabstop'* *'ts'*
'tabstop' 'ts' number (default 8)
local to buffer
Number of spaces that a <Tab> in the file counts for. Also see
diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt
index 2a199090..11a988ed 100644
--- a/runtime/doc/pattern.txt
+++ b/runtime/doc/pattern.txt
@@ -1,4 +1,4 @@
-*pattern.txt* For Vim version 7.0aa. Last change: 2006 Feb 14
+*pattern.txt* For Vim version 7.0aa. Last change: 2006 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1191,14 +1191,23 @@ Finally, these constructs are unique to Perl:
< Instead of // any character can be used to mark the start and
end of the {pattern}. Watch out for using special characters,
such as '"' and '|'.
+
{group} must exist at the moment this command is executed.
- The match overrides the 'hlsearch' highlighting.
- 'ignorecase' does not apply, use |/\c| in the pattern to
- ignore case. Otherwise case is not ignored.
+
+ The {group} highlighting still applies when a character is
+ to be highlighted for 'hlsearch'.
+
Note that highlighting the last used search pattern with
'hlsearch' is used in all windows, while the pattern defined
with ":match" only exists in the current window. It is kept
when switching to another buffer.
+
+ The |matchparen| plugin uses match highlighting, thus will
+ disable your ":match" command as soon as you move to a paren.
+
+ 'ignorecase' does not apply, use |/\c| in the pattern to
+ ignore case. Otherwise case is not ignored.
+
Another example, which highlights all characters in virtual
column 72 and more: >
:highlight rightMargin term=bold ctermfg=blue guifg=blue
@@ -1213,4 +1222,20 @@ Finally, these constructs are unique to Perl:
:mat[ch] none
Clear a previously defined match pattern.
+
+:2mat[ch] {group} /{pattern}/
+:2mat[ch]
+:2mat[ch] none
+:3mat[ch] {group} /{pattern}/
+:3mat[ch]
+:3mat[ch] none
+ Just like |:match| above, but set a separate match. Thus
+ there can be three matches active at the same time. The match
+ with the lowest number has priority if several match at the
+ same position.
+ The ":3match" command is used by the |matchparen| plugin. You
+ are suggested to use ":match" for manual matching and
+ ":2match" for another plugin.
+
+
vim:tw=78:ts=8:ft=help:norl:
diff --git a/runtime/doc/pi_paren.txt b/runtime/doc/pi_paren.txt
index d1733c6c..b8cf4dcf 100644
--- a/runtime/doc/pi_paren.txt
+++ b/runtime/doc/pi_paren.txt
@@ -1,4 +1,4 @@
-*pi_paren.txt* For Vim version 7.0aa. Last change: 2006 Feb 27
+*pi_paren.txt* For Vim version 7.0aa. Last change: 2006 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -23,10 +23,10 @@ And to enable it again: >
:DoMatchParen
-The highlighting used is ParenMatch. You can specify different colors with
+The highlighting used is MatchParen. You can specify different colors with
the ":highlight" command. Example: >
- :hi ParenMatch ctermbg=blue guibg=lightblue
+ :hi MatchParen ctermbg=blue guibg=lightblue
The characters to be matched come from the 'matchpairs' option. You can
change the value to highlight different matches. Note that not everything is
diff --git a/runtime/doc/spell.txt b/runtime/doc/spell.txt
index 43d6fe39..dc0ded00 100644
--- a/runtime/doc/spell.txt
+++ b/runtime/doc/spell.txt
@@ -1,4 +1,4 @@
-*spell.txt* For Vim version 7.0aa. Last change: 2006 Feb 01
+*spell.txt* For Vim version 7.0aa. Last change: 2006 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1254,45 +1254,6 @@ the affix file, without arguments:
Vim will try to figure out where one word ends and a next starts. When there
are spelling mistakes this may not be quite right.
->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-NOTE: The following has not been implemented yet, because there are no word
-lists that support this.
-> *spell-CMP*
-> Sometimes it is necessary to change a word when concatenating it to another,
-> by removing a few letters, inserting something or both. It can also be useful
-> to restrict concatenation to words that match a pattern. For this purpose CMP
-> items can be used. They look like this:
-> CMP {flag} {flags} {strip} {strip2} {add} {cond} {cond2}
->
-> {flag} the flag, as used in COMPOUNDFLAGS for the lead word
-> {flags} accepted flags for the following word ('.' to accept
-> all)
-> {strip} text to remove from the end of the lead word (zero
-> for no stripping)
-> {strip2} text to remove from the start of the following word
-> (zero for no stripping)
-> {add} text to insert between the words (zero for no
-> addition)
-> {cond} condition to match at the end of the lead word
-> {cond2} condition to match at the start of the following word
->
-> This is the same as what is used for SFX and PFX items, with the extra {flags}
-> and {cond2} fields. Example:
-> CMP f mrt 0 - . . ~
->
-> When used with the food and dish word list above, this means that a dash is
-> inserted after each food item. Thus you get "onion-soup" and
-> "onion-tomato-salat".
->
-> When there are CMP items for a compound flag the concatenation is only done
-> when a CMP item matches.
->
-> When there are no CMP items for a compound flag, then all words will be
-> concatenated, as if there was an item:
-> CMP {flag} . 0 0 . .
->
->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-
*spell-COMMON*
Common words can be specified with the COMMON item. This will give better
@@ -1305,7 +1266,9 @@ When multiple regions are specified in a ":mkspell" command the common words
for all regions are combined and used for all regions.
*spell-NOSPLITSUGS*
-This item indicates that suggestions for splitting a word will not appear:
+This item indicates that splitting a word to make suggestions is not a good
+idea. Split-word suggestions will appear only when there are few similar
+words.
NOSPLITSUGS ~
@@ -1315,8 +1278,6 @@ suggested. Can be used for obscene words.
NOSUGGEST % ~
-NOT IMPLEMENTED YET.
-
REPLACEMENTS *spell-REP*
diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt
index 0b64ca3a..b36837f7 100644
--- a/runtime/doc/starting.txt
+++ b/runtime/doc/starting.txt
@@ -1,4 +1,4 @@
-*starting.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
+*starting.txt* For Vim version 7.0aa. Last change: 2006 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -376,9 +376,10 @@ a slash. Thus "-R" means recovery and "-/R" readonly.
*-p*
-p[N] Open N tab pages. If [N] is not given, one tab page is opened
- for every file given as argument. The maximum is 10 tab
- pages. If there are more tab pages than arguments, the last
- few tab pages will be editing an empty file.
+ for every file given as argument. The maximum is set with
+ 'tabpagemax' pages (default 10). If there are more tab pages
+ than arguments, the last few tab pages will be editing an
+ empty file.
{not in Vi}
*-T*
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index d839e251..a7b25307 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 7.0aa. Last change: 2006 Feb 20
+*syntax.txt* For Vim version 7.0aa. Last change: 2006 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3968,8 +3968,12 @@ SignColumn column where |signs| are displayed
IncSearch 'incsearch' highlighting; also used for the text replaced with
":s///c"
*hl-LineNr*
-LineNr line number for ":number" and ":#" commands, and when 'number'
+LineNr Line number for ":number" and ":#" commands, and when 'number'
option is set.
+ *hl-MatchParen*
+MatchParen The character under the cursor or just before it, if it
+ is a paired bracket, and its match. |pi_paren.txt|
+
*hl-ModeMsg*
ModeMsg 'showmode' message (e.g., "-- INSERT --")
*hl-MoreMsg*
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 59f24078..3f8df8c8 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -897,6 +897,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
't_xs' term.txt /*'t_xs'*
'ta' options.txt /*'ta'*
'tabline' options.txt /*'tabline'*
+'tabpagemax' options.txt /*'tabpagemax'*
'tabstop' options.txt /*'tabstop'*
'tag' options.txt /*'tag'*
'tagbsearch' options.txt /*'tagbsearch'*
@@ -934,6 +935,7 @@ $VIMRUNTIME starting.txt /*$VIMRUNTIME*
'toolbar' options.txt /*'toolbar'*
'toolbariconsize' options.txt /*'toolbariconsize'*
'top' options.txt /*'top'*
+'tpm' options.txt /*'tpm'*
'tr' options.txt /*'tr'*
'ts' options.txt /*'ts'*
'tsl' options.txt /*'tsl'*
@@ -5524,6 +5526,7 @@ hl-FoldColumn syntax.txt /*hl-FoldColumn*
hl-Folded syntax.txt /*hl-Folded*
hl-IncSearch syntax.txt /*hl-IncSearch*
hl-LineNr syntax.txt /*hl-LineNr*
+hl-MatchParen syntax.txt /*hl-MatchParen*
hl-Menu syntax.txt /*hl-Menu*
hl-ModeMsg syntax.txt /*hl-ModeMsg*
hl-MoreMsg syntax.txt /*hl-MoreMsg*
@@ -6658,7 +6661,6 @@ spell-CHECKCOMPOUNDPATTERN spell.txt /*spell-CHECKCOMPOUNDPATTERN*
spell-CHECKCOMPOUNDREP spell.txt /*spell-CHECKCOMPOUNDREP*
spell-CHECKCOMPOUNDTRIPLE spell.txt /*spell-CHECKCOMPOUNDTRIPLE*
spell-CIRCUMFIX spell.txt /*spell-CIRCUMFIX*
-spell-CMP spell.txt /*spell-CMP*
spell-COMMON spell.txt /*spell-COMMON*
spell-COMPLEXPREFIXES spell.txt /*spell-COMPLEXPREFIXES*
spell-COMPOUNDBEGIN spell.txt /*spell-COMPOUNDBEGIN*
diff --git a/runtime/doc/tips.txt b/runtime/doc/tips.txt
index 30c548d6..e3a62fba 100644
--- a/runtime/doc/tips.txt
+++ b/runtime/doc/tips.txt
@@ -1,4 +1,4 @@
-*tips.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
+*tips.txt* For Vim version 7.0aa. Last change: 2006 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -457,6 +457,8 @@ This example shows the use of a few advanced tricks:
This should be put in a Vim script file, since it uses script-local variables.
It skips matches in strings or comments, unless the cursor started in string
or comment. This requires syntax highlighting.
+
+A slightly more advanced version is used in the |matchparen| plugin.
>
let s:paren_hl_on = 0
function s:Highlight_Matching_Paren()
diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt
index 060408ab..96602c95 100644
--- a/runtime/doc/windows.txt
+++ b/runtime/doc/windows.txt
@@ -1,4 +1,4 @@
-*windows.txt* For Vim version 7.0aa. Last change: 2006 Feb 24
+*windows.txt* For Vim version 7.0aa. Last change: 2006 Mar 01
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -559,7 +559,9 @@ can also get to them with the buffer list commands, like ":bnext".
Rearrange the screen to open one window for each argument.
All other windows are closed. When a count is given, this is
the maximum number of windows to open.
- Only uses the current tab page |tab-page|.
+ With the |:tab| modifier open a tab page for each argument.
+ When there are more arguments than 'tabpagemax' further ones
+ become split windows in the last tab page.
When the 'hidden' option is set, all buffers in closed windows
become hidden.
When 'hidden' is not set, and the 'autowrite' option is set,
@@ -1089,7 +1091,8 @@ list of buffers. |unlisted-buffer|
of windows opened ('winwidth' if |:vertical| was prepended).
Buf/Win Enter/Leave autocommands are not executed for the new
windows here, that's only done when they are really entered.
- Only uses the current tab page |tab-page|.
+ When the |:tab| modifier is used new windows are opended in a
+ new tab, up to 'tabpagemax'.
Note: All the commands above that start editing another buffer, keep the
'readonly' flag as it was. This differs from the ":edit" command, which sets
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index c25ab537..18af21a4 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2006 Feb 27
+" Last Change: 2006 Mar 01
" Listen very carefully, I will say this only once
if exists("did_load_filetypes")
@@ -1297,6 +1297,9 @@ au BufNewFile,BufRead *.rexx,*.rex setf rexx
" R (Splus)
au BufNewFile,BufRead *.s,*.S setf r
+" R Help file
+au BufNewFile,BufRead *.rd,*.Rd setf rd
+
" Rexx, Rebol or R
au BufNewFile,BufRead *.r,*.R call s:FTr()
diff --git a/runtime/syntax/tex.vim b/runtime/syntax/tex.vim
index 57286307..2bc6045e 100644
--- 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. <NdrchipO@ScampbellPfamily.AbizM>
-" Last Change: Dec 07, 2005
-" Version: 31
+" Last Change: Feb 28, 2006
+" Version: 32
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
"
" Notes: {{{1
@@ -372,7 +372,14 @@ if b:extfname == "dtx"
syn match texComment "\^\^A.*$" contains=@texCommentGroup
syn match texComment "^%\+" contains=@texCommentGroup
else
- syn match texComment "%.*$" contains=@texCommentGroup
+ if g:tex_fold_enabled
+ " allows syntax-folding of 2 or more contiguous comment lines
+ " single-line comments are not folded
+ syn match texComment "%.*$" contains=@texCommentGroup
+ syn region texComment start="^\zs\s*%.*\_s*%" skip="^\s*%" end='^\ze\s*[^%]' fold
+ else
+ syn match texComment "%.*$" contains=@texCommentGroup
+ endif
endif
" Separate lines used for verb` and verb# so that the end conditions {{{1
diff --git a/src/INSTALLmac.txt b/src/INSTALLmac.txt
index 1c4d7732..fa40c157 100644
--- a/src/INSTALLmac.txt
+++ b/src/INSTALLmac.txt
@@ -28,23 +28,32 @@ MacOS Classic is no longer supported. If you really want it use Vim 6.4.
1.1 Carbon interface (default)
You can compile vim with the standard Unix routine:
- cd ..
- ./configure
- make; make install
+ cd .../src
+ make
This will create a working Vim.app application bundle in the src
directory. You can move this bundle (the Vim.app directory) anywhere
- you want, for example, /Applications.
+ you want. Or use this command to move it to /Applications:
+ make install
You need at least Xcode 1.5 to compile Vim 7.0.
+ Configure will create a universal binary if possible. This requires
+ installing the universal SDK (currently for 10.4).
+
+ To overrule the architecture do this before running make:
+
+ ./configure --with-mac-arch=intel
+ or
+ ./configure --with-mac-arch=ppc
+
1.2 X-Windows or Plain Text
If you do not want the Carbon interface, you must explicitly tell
configure to use a different GUI.
- cd ..
+ cd .../src
./configure --disable-darwin --enable-gui=gtk2
make; make install
diff --git a/src/auto/configure b/src/auto/configure
index ad86242d..c69dd960 100755
--- a/src/auto/configure
+++ b/src/auto/configure
@@ -3395,7 +3395,7 @@ fi
fi
fi
- if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
+ if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
CFLAGS=`echo "$CFLAGS" | sed 's/-O[23456789]/-Oz/'`
fi
diff --git a/src/configure.in b/src/configure.in
index 60609ec8..ea27abbd 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -164,7 +164,9 @@ if test "`(uname) 2>/dev/null`" = Darwin; then
fi
fi
- dnl avoid a bug with -O2 for intel
+ dnl Avoid a bug with -O2 with gcc 4.0. Symptom: malloc() reports double
+ dnl free. This happens in expand_filename(), because the optimizer swaps
+ dnl two blocks of code that use "repl" that can't be swapped.
if test "$MACARCH" = "intel" -o "$MACARCH" = "both"; then
CFLAGS=`echo "$CFLAGS" | sed 's/-O[[23456789]]/-Oz/'`
fi
diff --git a/src/ops.c b/src/ops.c
index 487ae4ce..9695d9da 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -3379,6 +3379,7 @@ do_put(regname, dir, count, flags)
}
curwin->w_cursor.coladd = 0;
#endif
+ bd.textcol = 0;
for (i = 0; i < y_size; ++i)
{
int spaces;
@@ -3386,7 +3387,6 @@ do_put(regname, dir, count, flags)
bd.startspaces = 0;
bd.endspaces = 0;
- bd.textcol = 0;
vcol = 0;
delcount = 0;
@@ -3536,7 +3536,6 @@ do_put(regname, dir, count, flags)
}
}
}
- new_cursor = curwin->w_cursor;
curbuf->b_op_start = curwin->w_cursor;
}
/*
@@ -3544,6 +3543,7 @@ do_put(regname, dir, count, flags)
*/
else if (dir == BACKWARD)
--lnum;
+ new_cursor = curwin->w_cursor;
/*
* simple case: insert into current line
diff --git a/src/option.c b/src/option.c
index e67586bb..d692edf0 100644
--- a/src/option.c
+++ b/src/option.c
@@ -2295,6 +2295,13 @@ static struct vimoption
(char_u *)NULL, PV_NONE,
#endif
{(char_u *)"", (char_u *)0L}},
+ {"tabpagemax", "tpm", P_NUM|P_VI_DEF,
+#ifdef FEAT_WINDOWS
+ (char_u *)&p_tpm, PV_NONE,
+#else
+ (char_u *)NULL, PV_NONE,
+#endif
+ {(char_u *)10L, (char_u *)0L}},
{"tabstop", "ts", P_NUM|P_VI_DEF|P_RBUF,
(char_u *)&p_ts, PV_TS,
{(char_u *)8L, (char_u *)0L}},
diff --git a/src/option.h b/src/option.h
index 7f70b150..1ed2a4fd 100644
--- a/src/option.h
+++ b/src/option.h
@@ -710,6 +710,7 @@ EXTERN int p_scs; /* 'smartcase' */
EXTERN int p_sta; /* 'smarttab' */
#ifdef FEAT_WINDOWS
EXTERN int p_sb; /* 'splitbelow' */
+EXTERN long p_tpm; /* 'tabpagemax' */
# if defined(FEAT_STL_OPT)
EXTERN char_u *p_tal; /* 'tabline' */
# endif
diff --git a/src/screen.c b/src/screen.c
index 391fe0ad..f799b582 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -115,7 +115,7 @@ typedef struct
} match_T;
static match_T search_hl; /* used for 'hlsearch' highlight matching */
-static match_T match_hl; /* used for ":match" highlight matching */
+static match_T match_hl[3]; /* used for ":match" highlight matching */
#endif
#ifdef FEAT_FOLDING
@@ -833,14 +833,19 @@ win_update(wp)
#endif
#ifdef FEAT_SEARCH_EXTRA
- /* Setup for ":match" highlighting. Disable any previous match */
- match_hl.rm = wp->w_match;
- if (wp->w_match_id == 0)
- match_hl.attr = 0;
- else
- match_hl.attr = syn_id2attr(wp->w_match_id);
- match_hl.buf = buf;
- match_hl.lnum = 0;
+ /* Setup for ":match" and 'hlsearch' highlighting. Disable any previous
+ * match */
+ for (i = 0; i < 3; ++i)
+ {
+ match_hl[i].rm = wp->w_match[i];
+ if (wp->w_match_id[i] == 0)
+ match_hl[i].attr = 0;
+ else
+ match_hl[i].attr = syn_id2attr(wp->w_match_id[i]);
+ match_hl[i].buf = buf;
+ match_hl[i].lnum = 0;
+ match_hl[i].first_lnum = 0;
+ }
search_hl.buf = buf;
search_hl.lnum = 0;
search_hl.first_lnum = 0;
@@ -905,11 +910,17 @@ win_update(wp)
* lines above the change.
* Same for a ":match" pattern.
*/
- if ((search_hl.rm.regprog != NULL
- && re_multiline(search_hl.rm.regprog))
- || (match_hl.rm.regprog != NULL
- && re_multiline(match_hl.rm.regprog)))
+ if (search_hl.rm.regprog != NULL
+ && re_multiline(search_hl.rm.regprog))
top_to_mod = TRUE;
+ else
+ for (i = 0; i < 3; ++i)
+ if (match_hl[i].rm.regprog != NULL
+ && re_multiline(match_hl[i].rm.regprog))
+ {
+ top_to_mod = TRUE;
+ break;
+ }
#endif
}
#ifdef FEAT_FOLDING
@@ -2570,6 +2581,7 @@ win_line(wp, lnum, startrow, endrow, nochange)
#endif
#ifdef FEAT_SEARCH_EXTRA
match_T *shl; /* points to search_hl or match_hl */
+ int i;
#endif
#ifdef FEAT_ARABIC
int prev_c = 0; /* previous Arabic character */
@@ -3007,12 +3019,12 @@ win_line(wp, lnum, startrow, endrow, nochange)
#ifdef FEAT_SEARCH_EXTRA
/*
- * Handle highlighting the last used search pattern.
- * Do this for both search_hl and match_hl.
+ * Handle highlighting the last used search pattern and ":match".
+ * Do this for both search_hl and match_hl[3].
*/
- shl = &search_hl;
- for (;;)
+ for (i = 3; i >= 0; --i)
{
+ shl = (i == 3) ? &search_hl : &match_hl[i];
shl->startcol = MAXCOL;
shl->endcol = MAXCOL;
shl->attr_cur = 0;
@@ -3055,9 +3067,6 @@ win_line(wp, lnum, startrow, endrow, nochange)
area_highlighting = TRUE;
}
}
- if (shl == &match_hl)
- break;
- shl = &match_hl;
}
#endif
@@ -3305,9 +3314,9 @@ win_line(wp, lnum, startrow, endrow, nochange)
* ":match" overrules 'hlsearch'.
*/
v = (long)(ptr - line);
- shl = &search_hl;
- for (;;)
+ for (i = 3; i >= 0; --i)
{
+ shl = (i == 3) ? &search_hl : &match_hl[i];
while (shl->rm.regprog != NULL)
{
if (shl->startcol != MAXCOL
@@ -3355,15 +3364,17 @@ win_line(wp, lnum, startrow, endrow, nochange)
}
break;
}
- if (shl == &match_hl)
- break;
- shl = &match_hl;
}
+
/* ":match" highlighting overrules 'hlsearch' */
- if (match_hl.attr_cur != 0)
- search_attr = match_hl.attr_cur;
- else
- search_attr = search_hl.attr_cur;
+ for (i = 0; i <= 3; ++i)
+ if (i == 3)
+ search_attr = search_hl.attr_cur;
+ else if (match_hl[i].attr_cur != 0)
+ {
+ search_attr = match_hl[i].attr_cur;
+ break;
+ }
}
#endif
@@ -4133,7 +4144,9 @@ win_line(wp, lnum, startrow, endrow, nochange)
#ifdef FEAT_SEARCH_EXTRA
/* highlight 'hlsearch' match at end of line */
|| (ptr - line) - 1 == (long)search_hl.startcol
- || (ptr - line) - 1 == (long)match_hl.startcol
+ || (ptr - line) - 1 == (long)match_hl[0].startcol
+ || (ptr - line) - 1 == (long)match_hl[1].startcol
+ || (ptr - line) - 1 == (long)match_hl[2].startcol
#endif
))
{
@@ -4170,10 +4183,16 @@ win_line(wp, lnum, startrow, endrow, nochange)
#ifdef FEAT_SEARCH_EXTRA
if (area_attr == 0)
{
- if ((ptr - line) - 1 == (long)match_hl.startcol)
- char_attr = match_hl.attr;
- else
- char_attr = search_hl.attr;
+ for (i = 0; i <= 3; ++i)
+ {
+ if (i == 3)
+ char_attr = search_hl.attr;
+ else if ((ptr - line) - 1 == (long)match_hl[i].startcol)
+ {
+ char_attr = match_hl[i].attr;
+ break;
+ }
+ }
}
#endif
ScreenAttrs[off] = char_attr;
@@ -6061,15 +6080,16 @@ prepare_search_hl(wp, lnum)
{
match_T *shl; /* points to search_hl or match_hl */
int n;
+ int i;
/*
* When using a multi-line pattern, start searching at the top
* of the window or just after a closed fold.
- * Do this both for search_hl and match_hl.
+ * Do this both for search_hl and match_hl[3].
*/
- shl = &search_hl;
- for (;;)
+ for (i = 3; i >= 0; --i)
{
+ shl = (i == 3) ? &search_hl : &match_hl[i];
if (shl->rm.regprog != NULL
&& shl->lnum == 0
&& re_multiline(shl->rm.regprog))
@@ -6104,9 +6124,6 @@ prepare_search_hl(wp, lnum)
}
}
}
- if (shl == &match_hl)
- break;
- shl = &match_hl;
}
}
@@ -6884,12 +6901,8 @@ screenalloc(clear)
* Continuing with the old ScreenLines may result in a crash, because the
* size is wrong.
*/
-#ifdef FEAT_WINDOWS
FOR_ALL_TAB_WINDOWS(tp, wp)
win_free_lsize(wp);
-#else
- win_free_lsize(curwin);
-#endif
new_ScreenLines = (schar_T *)lalloc((long_u)(
(Rows + 1) * Columns * sizeof(schar_T)), FALSE);
@@ -8622,7 +8635,8 @@ draw_tabline()
attr = attr_nosel;
tabcount = 0;
scol = 0;
- for (tp = first_tabpage; tp != NULL && col < Columns; tp = tp->tp_next)
+ for (tp = first_tabpage; tp != NULL && col < Columns - 4;
+ tp = tp->tp_next)
{
scol = col;
@@ -8657,6 +8671,8 @@ draw_tabline()
{
vim_snprintf((char *)NameBuff, MAXPATHL, "%d", wincount);
len = STRLEN(NameBuff);
+ if (col + len >= Columns - 3)
+ break;
screen_puts_len(NameBuff, len, 0, col,
#if defined(FEAT_SYN_HL)
hl_combine_attr(attr, hl_attr(HLF_T))
@@ -8692,6 +8708,8 @@ draw_tabline()
p += len - room;
len = room;
}
+ if (len > Columns - col - 1)
+ len = Columns - col - 1;
screen_puts_len(p, STRLEN(p), 0, col, attr);
col += len;
diff --git a/src/search.c b/src/search.c
index 27b9ac13..163605c5 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1891,6 +1891,8 @@ findmatchlimit(oap, initc, flags, maxtravel)
do_quotes = -1;
start_in_quotes = MAYBE;
+ clearpos(&match_pos);
+
/* backward search: Check if this line contains a single-line comment */
if ((backwards && comment_dir)
#ifdef FEAT_LISP
@@ -3096,6 +3098,7 @@ current_word(oap, count, include, bigword)
int include_white = FALSE;
cls_bigword = bigword;
+ clearpos(&start_pos);
#ifdef FEAT_VISUAL
/* Correct cursor when 'selection' is exclusive */
diff --git a/src/structs.h b/src/structs.h
index 0d6e497d..5b1aed61 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1894,8 +1894,8 @@ struct window_S
#endif
#ifdef FEAT_SEARCH_EXTRA
- regmmatch_T w_match; /* regexp program for ":match" */
- int w_match_id; /* highlight ID for ":match" */
+ regmmatch_T w_match[3]; /* regexp programs for ":match" */
+ int w_match_id[3]; /* highlight IDs for ":match" */
#endif
/*
diff --git a/src/syntax.c b/src/syntax.c
index a96dc770..b6bc696d 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -780,6 +780,8 @@ syn_sync(wp, start_lnum, last_valid)
else
break_lnum = 0;
+ found_m_endpos.lnum = 0;
+ found_m_endpos.col = 0;
end_lnum = start_lnum;
lnum = start_lnum;
while (--lnum > break_lnum)
diff --git a/src/term.c b/src/term.c
index c3c5979e..99dc1b0c 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3918,6 +3918,7 @@ check_termcode(max_offset, buf, buflen)
continue;
key_name[0] = NUL; /* no key name found yet */
+ key_name[1] = NUL; /* no key name found yet */
modifiers = 0; /* no modifiers yet */
#ifdef FEAT_GUI
diff --git a/src/testdir/test59.in b/src/testdir/test59.in
index e3de1d63..368191c3 100644
--- a/src/testdir/test59.in
+++ b/src/testdir/test59.in
@@ -121,7 +121,7 @@ KEP =
RAR ?
BAD !
-NOSPLITSUGS
+#NOSPLITSUGS
PFX I N 1
PFX I 0 in .
@@ -169,7 +169,7 @@ KEP =
RAR ?
BAD !
-NOSPLITSUGS
+#NOSPLITSUGS
PFX I N 1
PFX I 0 in .
@@ -326,7 +326,7 @@ KEP =
RAR ?
BAD !
-NOSPLITSUGS
+#NOSPLITSUGS
PFX I N 1
PFX I 0 in .
diff --git a/src/version.h b/src/version.h
index 33aedab5..7ebf4836 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 Feb 28)"
-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 28, compiled "
+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 1)"
+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Mar 1, compiled "