• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Révision4b8583e82cb8875d14ff928db281aea8145d0b0d (tree)
l'heure2006-02-19 07:14:51
Auteurvimboss
Commitervimboss

Message de Log

updated for version 7.0201

Change Summary

Modification

diff -r 513866ffe6af -r 4b8583e82cb8 runtime/autoload/htmlcomplete.vim
--- a/runtime/autoload/htmlcomplete.vim Fri Feb 17 21:53:23 2006 +0000
+++ b/runtime/autoload/htmlcomplete.vim Sat Feb 18 22:14:51 2006 +0000
@@ -1,7 +1,7 @@
11 " Vim completion script
22 " Language: XHTML 1.0 Strict
33 " Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
4-" Last Change: 2006 Feb 6
4+" Last Change: 2006 Feb 18
55
66 function! htmlcomplete#CompleteTags(findstart, base)
77 if a:findstart
@@ -540,24 +540,26 @@
540540 let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
541541 return [opentag.">"]
542542 endif
543+ " Load data {{{
544+ if !exists("g:xmldata_xhtml10s")
545+ runtime! autoload/xml/xhtml10s.vim
546+ endif
547+ " }}}
548+ " Tag completion {{{
543549 " Deal with tag completion.
544550 let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
545551 if opentag == ''
546552 " Hack for sometimes failing GetLastOpenTag.
547553 " As far as I tested fail isn't GLOT fault but problem
548554 " of invalid document - not properly closed tags and other mish-mash.
549- " If returns empty string assume <body>. Safe bet.
550- let opentag = 'body'
555+ " Also when document is empty. Return list of *all* tags.
556+ let tags = keys(g:xmldata_xhtml10s)
557+ call filter(tags, 'v:val !~ "^vimxml"')
558+ else
559+ let tags = g:xmldata_xhtml10s[opentag][0]
551560 endif
552561 " }}}
553- " Load data {{{
554- if !exists("g:xmldata_xhtml10s")
555- runtime! autoload/xml/xhtml10s.vim
556- endif
557- " }}}
558- " Tag completion {{{
559562
560- let tags = g:xmldata_xhtml10s[opentag][0]
561563
562564 for m in sort(tags)
563565 if m =~ '^'.context
diff -r 513866ffe6af -r 4b8583e82cb8 runtime/autoload/xmlcomplete.vim
--- a/runtime/autoload/xmlcomplete.vim Fri Feb 17 21:53:23 2006 +0000
+++ b/runtime/autoload/xmlcomplete.vim Sat Feb 18 22:14:51 2006 +0000
@@ -1,7 +1,7 @@
11 " Vim completion script
22 " Language: XML
33 " Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
4-" Last Change: 2006 Feb 6
4+" Last Change: 2006 Feb 18
55
66 " This function will create Dictionary with users namespace strings and values
77 " canonical (system) names of data files. Names should be lowercase,
@@ -319,10 +319,13 @@
319319 let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
320320 let opentag = substitute(opentag, '^\k*:', '', '')
321321 if opentag == ''
322- return []
322+ "return []
323+ let tags = keys(g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]})
324+ call filter(tags, 'v:val !~ "^vimxml"')
325+ else
326+ let tags = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[opentag][0]
323327 endif
324328
325- let tags = g:xmldata{'_'.g:xmldata_connection[b:xml_namespace]}[opentag][0]
326329 let context = substitute(context, '^\k*:', '', '')
327330
328331 for m in tags
diff -r 513866ffe6af -r 4b8583e82cb8 runtime/doc/Makefile
--- a/runtime/doc/Makefile Fri Feb 17 21:53:23 2006 +0000
+++ b/runtime/doc/Makefile Sat Feb 18 22:14:51 2006 +0000
@@ -89,6 +89,7 @@
8989 starting.txt \
9090 spell.txt \
9191 syntax.txt \
92+ tabpage.txt \
9293 tagsrch.txt \
9394 term.txt \
9495 tips.txt \
@@ -211,6 +212,7 @@
211212 starting.html \
212213 spell.html \
213214 syntax.html \
215+ tabpage.html \
214216 tagsrch.html \
215217 tags.html \
216218 term.html \
diff -r 513866ffe6af -r 4b8583e82cb8 runtime/doc/autocmd.txt
--- a/runtime/doc/autocmd.txt Fri Feb 17 21:53:23 2006 +0000
+++ b/runtime/doc/autocmd.txt Sat Feb 18 22:14:51 2006 +0000
@@ -1,4 +1,4 @@
1-*autocmd.txt* For Vim version 7.0aa. Last change: 2006 Feb 13
1+*autocmd.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -284,6 +284,8 @@
284284
285285 |WinEnter| after entering another window
286286 |WinLeave| before leaving a window
287+|TabEnterPost| after entering another tab page
288+|TabLeavePre| before leaving a tab page
287289 |CmdwinEnter| after entering the command-line window
288290 |CmdwinLeave| before leaving the command-line window
289291
@@ -704,6 +706,14 @@
704706 where this option was set, and <amatch> for
705707 the new value of 'syntax'.
706708 See |:syn-on|.
709+ *TabEnterPost*
710+TabEnterPost Just after entering a tab page. |tab-page|
711+ Before triggering the WinEnter and BufEnter
712+ events.
713+ *TabLeavePre*
714+TabLeavePre Just before leaving a tab page. |tab-page|
715+ BufLeave and WinLeave events will have been
716+ triggered first.
707717 *TermChanged*
708718 TermChanged After the value of 'term' has changed. Useful
709719 for re-loading the syntax file to update the
diff -r 513866ffe6af -r 4b8583e82cb8 runtime/doc/diff.txt
--- a/runtime/doc/diff.txt Fri Feb 17 21:53:23 2006 +0000
+++ b/runtime/doc/diff.txt Sat Feb 18 22:14:51 2006 +0000
@@ -1,4 +1,4 @@
1-*diff.txt* For Vim version 7.0aa. Last change: 2006 Jan 22
1+*diff.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41,6 +41,10 @@
4141
4242 This only works when a standard "diff" command is available. See 'diffexpr'.
4343
44+Diffs are local to the current tab page |tab-page|. You can't see diffs with
45+a window in another tab page. This does make it possible to have several
46+diffs at the same time, each in their own tab page.
47+
4448 What happens is that Vim opens a window for each of the files. This is like
4549 using the |-O| argument. This uses vertical splits. If you prefer horizontal
4650 splits add the |-o| argument: >
@@ -113,7 +117,7 @@
113117 *:diffo* *:diffoff*
114118 :diffoff Switch off diff mode for the current window.
115119
116-:diffoff! Switch off diff mode for all windows.
120+:diffoff! Switch off diff mode for all windows in the current tab page.
117121
118122 The ":diffoff" command resets the relevant options to their default value.
119123 This may be different from what the values were before diff mode was started,
diff -r 513866ffe6af -r 4b8583e82cb8 runtime/doc/editing.txt
--- a/runtime/doc/editing.txt Fri Feb 17 21:53:23 2006 +0000
+++ b/runtime/doc/editing.txt Sat Feb 18 22:14:51 2006 +0000
@@ -1,4 +1,4 @@
1-*editing.txt* For Vim version 7.0aa. Last change: 2006 Jan 20
1+*editing.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1014,6 +1014,9 @@
10141014 Vim refuses to |abandon| the current buffer, and when
10151015 the last file in the argument list has not been
10161016 edited.
1017+ If there are other tab pages and quitting the last
1018+ window in the current tab page the current tab page is
1019+ closed |tab-page|.
10171020
10181021 :conf[irm] q[uit] Quit, but give prompt when changes have been made, or
10191022 the last file in the argument list has not been
diff -r 513866ffe6af -r 4b8583e82cb8 runtime/doc/eval.txt
--- a/runtime/doc/eval.txt Fri Feb 17 21:53:23 2006 +0000
+++ b/runtime/doc/eval.txt Sat Feb 18 22:14:51 2006 +0000
@@ -1,4 +1,4 @@
1-*eval.txt* For Vim version 7.0aa. Last change: 2006 Feb 14
1+*eval.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1690,6 +1690,7 @@
16901690 String attribute {what} of syntax ID {synID}
16911691 synIDtrans( {synID}) Number translated syntax ID of {synID}
16921692 system( {expr} [, {input}]) String output of shell command/filter {expr}
1693+tabpage( [{expr}]) Number number of current tab page
16931694 taglist( {expr}) List list of tags matching {expr}
16941695 tagfiles() List tags files used
16951696 tempname() String name for a temporary file
@@ -1705,7 +1706,7 @@
17051706 wincol() Number window column of the cursor
17061707 winheight( {nr}) Number height of window {nr}
17071708 winline() Number window line of the cursor
1708-winnr() Number number of current window
1709+winnr( [{expr}]) Number number of current window
17091710 winrestcmd() String returns command to restore window sizes
17101711 winwidth( {nr}) Number width of window {nr}
17111712 writefile({list}, {fname} [, {binary}])
@@ -4447,6 +4448,14 @@
44474448 Use |:checktime| to force a check.
44484449
44494450
4451+tabpagenr([{arg}]) *tabpagenr()*
4452+ The result is a Number, which is the number of the current
4453+ tab page. The first tab page has number 1.
4454+ When the optional argument is "$", the number of the last tab
4455+ page is returned (the tab page count).
4456+ The number can be used with the |:tab| command.
4457+
4458+
44504459 taglist({expr}) *taglist()*
44514460 Returns a list of tags matching the regular expression {expr}.
44524461 Each list item is a dictionary with at least the following
@@ -4618,7 +4627,7 @@
46184627 winnr([{arg}]) The result is a Number, which is the number of the current
46194628 window. The top window has number 1.
46204629 When the optional argument is "$", the number of the
4621- last window is returnd (the window count).
4630+ last window is returned (the window count).
46224631 When the optional argument is "#", the number of the last
46234632 accessed window is returned (where |CTRL-W_p| goes to).
46244633 If there is no previous window 0 is returned.
diff -r 513866ffe6af -r 4b8583e82cb8 runtime/doc/help.txt
--- a/runtime/doc/help.txt Fri Feb 17 21:53:23 2006 +0000
+++ b/runtime/doc/help.txt Sat Feb 18 22:14:51 2006 +0000
@@ -1,4 +1,4 @@
1-*help.txt* For Vim version 7.0aa. Last change: 2005 Nov 30
1+*help.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
22
33 VIM - main help file
44 k
@@ -122,6 +122,7 @@
122122 |tagsrch.txt| tags and special searches
123123 |quickfix.txt| commands for a quick edit-compile-fix cycle
124124 |windows.txt| commands for using multiple windows and buffers
125+|tabpage.txt| commands for using multiple tab pages
125126 |syntax.txt| syntax highlighting
126127 |spell.txt| spell checking
127128 |diff.txt| working with two or three versions of the same file
diff -r 513866ffe6af -r 4b8583e82cb8 runtime/doc/index.txt
--- a/runtime/doc/index.txt Fri Feb 17 21:53:23 2006 +0000
+++ b/runtime/doc/index.txt Sat Feb 18 22:14:51 2006 +0000
@@ -1,4 +1,4 @@
1-*index.txt* For Vim version 7.0aa. Last change: 2006 Jan 26
1+*index.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1305,7 +1305,7 @@
13051305 |:omap| :om[ap] like ":map" but for Operator-pending mode
13061306 |:omapclear| :omapc[lear] remove all mappings for Operator-pending mode
13071307 |:omenu| :ome[nu] add menu for Operator-pending mode
1308-|:only| :on[ly] close all windows except current one
1308+|:only| :on[ly] close all windows except the current one
13091309 |:onoremap| :ono[remap] like ":noremap" but for Operator-pending mode
13101310 |:onoremenu| :onoreme[nu] like ":noremenu" but for Operator-pending mode
13111311 |:options| :opt[ions] open the options-window
@@ -1436,6 +1436,13 @@
14361436 |:syncbind| :sync[bind] sync scroll binding
14371437 |:t| :t same as ":copy"
14381438 |:tNext| :tN[ext] jump to previous matching tag
1439+|:tabclose| :tabc[lose] close current tab page
1440+|:tabedit| :tabe[dit] edit a file in a new tab page
1441+|:tabfind| :tabf[ind] find file in 'path', edit it in a new tab page
1442+|:tabnew| :tabn[ew] edit a file in a new tab page
1443+|:tabonly| :tabo[nly] close all tab pages except the current one
1444+|:tabs| :tabs list the tab pages and what they contain
1445+|:tab| :tab jump to another tab page
14391446 |:tag| :ta[g] jump to tag
14401447 |:tags| :tags show the contents of the tag stack
14411448 |:tcl| :tc[l] execute Tcl command
diff -r 513866ffe6af -r 4b8583e82cb8 runtime/doc/options.txt
--- a/runtime/doc/options.txt Fri Feb 17 21:53:23 2006 +0000
+++ b/runtime/doc/options.txt Sat Feb 18 22:14:51 2006 +0000
@@ -1,4 +1,4 @@
1-*options.txt* For Vim version 7.0aa. Last change: 2006 Feb 14
1+*options.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -5336,6 +5336,8 @@
53365336 winsize window sizes
53375337
53385338 Don't include both "curdir" and "sesdir".
5339+ There is no option to include tab pages yet, only the current tab page
5340+ is stored in the session. |tab-page|
53395341 When "curdir" nor "sesdir" is included, file names are stored with
53405342 absolute paths.
53415343 "slash" and "unix" are useful on Windows when sharing session files
@@ -6232,6 +6234,19 @@
62326234 'S' flag in 'cpoptions'.
62336235 Only normal file name characters can be used, "/\*?[|<>" are illegal.
62346236
6237+ *'tabline'* *'tal'*
6238+'tabline' 'tal' number (default 1)
6239+ global
6240+ {not in Vi}
6241+ {not available when compiled without the +windows
6242+ feature}
6243+ The value of this option specifies when the line with tab page labels
6244+ will be displayed:
6245+ 0: never
6246+ 1: only if there are at least two tab pages
6247+ 2: always
6248+ |tab-page|
6249+
62356250 *'tabstop'* *'ts'*
62366251 'tabstop' 'ts' number (default 8)
62376252 local to buffer
diff -r 513866ffe6af -r 4b8583e82cb8 runtime/doc/starting.txt
--- a/runtime/doc/starting.txt Fri Feb 17 21:53:23 2006 +0000
+++ b/runtime/doc/starting.txt Sat Feb 18 22:14:51 2006 +0000
@@ -1,4 +1,4 @@
1-*starting.txt* For Vim version 7.0aa. Last change: 2006 Feb 14
1+*starting.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -374,6 +374,13 @@
374374 the command line determines how the windows will be split.
375375 {not in Vi}
376376
377+ *-p*
378+-p[N] Open N tab pages. If [N] is not given, one tab page is opened
379+ for every file given as argument. The maximum is 10 tab
380+ pages. If there are more tab pages than arguments, the last
381+ few tab pages will be editing an empty file.
382+ {not in Vi}
383+
377384 *-T*
378385 -T {terminal} Set the terminal type to "terminal". This influences the
379386 codes that Vim will send to your terminal. This is normally
@@ -831,6 +838,8 @@
831838 11. Open all windows
832839 When the |-o| flag was given, windows will be opened (but not
833840 displayed yet).
841+ When the |-p| flag was given, tab pages will be created (but not
842+ displayed yet).
834843 When switching screens, it happens now. Redrawing starts.
835844 If the "-q" flag was given to Vim, the first error is jumped to.
836845 Buffers for all windows will be loaded.
@@ -1203,6 +1212,9 @@
12031212 :nmap <F2> :wa<Bar>exe "mksession! " . v:this_session<CR>:so ~/sessions/
12041213 This saves the current Session, and starts off the command to load another.
12051214
1215+A session only includes the current tab page. There currently is no option to
1216+store all tab pages. |tab-page|
1217+
12061218 The |SessionLoadPost| autocmd event is triggered after a session file is
12071219 loaded/sourced.
12081220 *SessionLoad-variable*
diff -r 513866ffe6af -r 4b8583e82cb8 runtime/doc/tabpage.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/runtime/doc/tabpage.txt Sat Feb 18 22:14:51 2006 +0000
@@ -0,0 +1,125 @@
1+*tabpage.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
2+
3+
4+ VIM REFERENCE MANUAL by Bram Moolenaar
5+
6+
7+Editing with windows in multuple tab pages. *tab-page* *tabpage*
8+
9+The commands which have been added to use multiple tab pages are explained
10+here. Additionally, there are explanations for commands that work differently
11+when used in combination with more than one tab page.
12+
13+1. Introduction |tab-page-intro|
14+2. Commands |tab-page-commands|
15+3. Other items |tab-page-other|
16+
17+{Vi does not have any of these commands}
18+{not able to use multiple tab pages when the |+windows| feature was disabled
19+at compile time}
20+
21+==============================================================================
22+1. Introduction *tab-page-intro*
23+
24+A tab page holds one or more windows. You can easily switch between tab
25+pages, so that you have several collections of windows to work on different
26+things.
27+
28+Usually you will see a list of labels at the top of the Vim window, one for
29+each tab page. With the mouse you can click on the label to jump to that tab
30+page. There are other ways to move between tab pages, see below.
31+
32+Most commands work only in the current tab page. That includes the |CTRL-W|
33+commands, |:windo|, |:all| and |:ball|. The commands that are aware of
34+other tab pages than the current one are mentioned below.
35+
36+Tabs are also a nice way to edit a buffer temporarily without changing the
37+current window layout. Open a new tab page, do whatever you want to do and
38+close the tab page.
39+
40+==============================================================================
41+2. Commands *tab-page-commands*
42+
43+OPENING A NEW TAB PAGE:
44+
45+When starting Vim "vim -p filename ..." opens each file argument in a separate
46+tab page (up to 10). |-p|
47+
48+:tabe[dit] *:tabe* *:tabedit*
49+:tabn[ew] Open a new tab page with an empty window.
50+
51+:tabe[dit] [++opt] [+cmd] {file}
52+:tabn[ew] [++opt] [+cmd] {file}
53+ Open a new tab page and edit {file}, like with |:edit|.
54+
55+:tabf[ind] [++opt] [+cmd] {file}
56+ Open a new tab page and edit {file} in 'path', like with
57+ |:find|.
58+ {not available when the |+file_in_path| feature was disabled
59+ at compile time}
60+
61+
62+CLOSING A TAB PAGE:
63+
64+Using |:close| in the last window of a tab page closes it.
65+
66+Using the mouse: If the tab page line is displayed you can click in the "X" at
67+the top right to close the current tab page. |'tabline'|
68+
69+ *:tabc* *:tabclose*
70+:tabc[lose][!] Close current tab page.
71+ This command fails when:
72+ - There is only one tab page on the screen. *E784*
73+ - When 'hidden' is not set, [!] is not used, a buffer has
74+ changes, and there is no other window on this buffer.
75+ Changes to the buffer are not written and won't get lost, so
76+ this is a "safe" command.
77+
78+:tabc[lose][!] {count}
79+ Close tab page {count}. Fails in the same way as ':tabclose"
80+ above.
81+
82+ *:tabo* *:tabonly*
83+:tabo[nly][!] Close all other tab pages.
84+ When the 'hidden' option is set, all buffers in closed windows
85+ become hidden.
86+ When 'hidden' is not set, and the 'autowrite' option is set,
87+ modified buffers are written. Otherwise, windows that have
88+ buffers that are modified are not removed, unless the [!] is
89+ given, then they become hidden. But modified buffers are
90+ never abandoned, so changes cannot get lost.
91+
92+
93+SWITCHING TO ANOTHER TAB PAGE:
94+
95+Using the mouse: If the tab page line is displayed you can click in a tab page
96+label to switch to that tab page. |'tabline'|
97+
98+:tab *:tab* *gt*
99+gt Go to the next tab page. Wraps around from the last to the
100+ first one.
101+
102+:tab {count}
103+{count}gt Go to tab page {count}. The first tab page has number one.
104+
105+
106+Other commands:
107+ *:tabs*
108+:tabs List the tab pages and the windows they contain. Shows a "+"
109+ for modified buffers.
110+
111+==============================================================================
112+3. Other items *tab-page-other*
113+
114+You can use the 'tabline' option to specify when you want the line with tab
115+page labels to appear: never, when there is more than one tab page or always.
116+
117+Diff mode works per tab page. You can see the diffs between several files
118+within one tab page. Other tab pages can show differences between other
119+files.
120+
121+The TabLeavePre and TabEnterPost autocommand events can be used to do
122+something when switching from one tab page to another.
123+
124+
125+ vim:tw=78:ts=8:ft=help:norl:
diff -r 513866ffe6af -r 4b8583e82cb8 runtime/doc/tags
--- a/runtime/doc/tags Fri Feb 17 21:53:23 2006 +0000
+++ b/runtime/doc/tags Sat Feb 18 22:14:51 2006 +0000
@@ -892,6 +892,7 @@
892892 't_vs' term.txt /*'t_vs'*
893893 't_xs' term.txt /*'t_xs'*
894894 'ta' options.txt /*'ta'*
895+'tabline' options.txt /*'tabline'*
895896 'tabstop' options.txt /*'tabstop'*
896897 'tag' options.txt /*'tag'*
897898 'tagbsearch' options.txt /*'tagbsearch'*
@@ -899,6 +900,7 @@
899900 'tagrelative' options.txt /*'tagrelative'*
900901 'tags' options.txt /*'tags'*
901902 'tagstack' options.txt /*'tagstack'*
903+'tal' options.txt /*'tal'*
902904 'tb' options.txt /*'tb'*
903905 'tbi' options.txt /*'tbi'*
904906 'tbidi' options.txt /*'tbidi'*
@@ -1224,6 +1226,7 @@
12241226 -n starting.txt /*-n*
12251227 -nb starting.txt /*-nb*
12261228 -o starting.txt /*-o*
1229+-p starting.txt /*-p*
12271230 -q starting.txt /*-q*
12281231 -qf starting.txt /*-qf*
12291232 -r starting.txt /*-r*
@@ -2638,6 +2641,14 @@
26382641 :tN tagsrch.txt /*:tN*
26392642 :tNext tagsrch.txt /*:tNext*
26402643 :ta tagsrch.txt /*:ta*
2644+:tab tabpage.txt /*:tab*
2645+:tabc tabpage.txt /*:tabc*
2646+:tabclose tabpage.txt /*:tabclose*
2647+:tabe tabpage.txt /*:tabe*
2648+:tabedit tabpage.txt /*:tabedit*
2649+:tabo tabpage.txt /*:tabo*
2650+:tabonly tabpage.txt /*:tabonly*
2651+:tabs tabpage.txt /*:tabs*
26412652 :tag tagsrch.txt /*:tag*
26422653 :tags tagsrch.txt /*:tags*
26432654 :tc if_tcl.txt /*:tc*
@@ -3875,6 +3886,7 @@
38753886 E781 spell.txt /*E781*
38763887 E782 spell.txt /*E782*
38773888 E783 spell.txt /*E783*
3889+E784 tabpage.txt /*E784*
38783890 E79 message.txt /*E79*
38793891 E80 message.txt /*E80*
38803892 E800 arabic.txt /*E800*
@@ -4086,6 +4098,8 @@
40864098 TERM starting.txt /*TERM*
40874099 TTpro-telnet syntax.txt /*TTpro-telnet*
40884100 Tab intro.txt /*Tab*
4101+TabEnterPost autocmd.txt /*TabEnterPost*
4102+TabLeavePre autocmd.txt /*TabLeavePre*
40894103 Tcl if_tcl.txt /*Tcl*
40904104 TermChanged autocmd.txt /*TermChanged*
40914105 TermResponse autocmd.txt /*TermResponse*
@@ -5340,6 +5354,7 @@
53405354 gs various.txt /*gs*
53415355 gsp.vim syntax.txt /*gsp.vim*
53425356 gstar pattern.txt /*gstar*
5357+gt tabpage.txt /*gt*
53435358 gtk-tooltip-colors gui_x11.txt /*gtk-tooltip-colors*
53445359 gu change.txt /*gu*
53455360 gugu change.txt /*gugu*
@@ -5429,6 +5444,7 @@
54295444 hebrew.txt hebrew.txt /*hebrew.txt*
54305445 help various.txt /*help*
54315446 help-context help.txt /*help-context*
5447+help-tags tags 1
54325448 help-translated various.txt /*help-translated*
54335449 help-xterm-window various.txt /*help-xterm-window*
54345450 help.txt help.txt /*help.txt*
@@ -6927,6 +6943,13 @@
69276943 t_vs term.txt /*t_vs*
69286944 t_xs term.txt /*t_xs*
69296945 tab intro.txt /*tab*
6946+tab-page tabpage.txt /*tab-page*
6947+tab-page-commands tabpage.txt /*tab-page-commands*
6948+tab-page-intro tabpage.txt /*tab-page-intro*
6949+tab-page-other tabpage.txt /*tab-page-other*
6950+tabpage tabpage.txt /*tabpage*
6951+tabpage.txt tabpage.txt /*tabpage.txt*
6952+tabpagenr() eval.txt /*tabpagenr()*
69306953 tag tagsrch.txt /*tag*
69316954 tag-! tagsrch.txt /*tag-!*
69326955 tag-any-white tagsrch.txt /*tag-any-white*
diff -r 513866ffe6af -r 4b8583e82cb8 runtime/doc/tips.txt
--- a/runtime/doc/tips.txt Fri Feb 17 21:53:23 2006 +0000
+++ b/runtime/doc/tips.txt Sat Feb 18 22:14:51 2006 +0000
@@ -1,4 +1,4 @@
1-*tips.txt* For Vim version 7.0aa. Last change: 2006 Feb 16
1+*tips.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -450,11 +450,13 @@
450450 This example shows the use of a few advanced tricks:
451451 - using the |CursorMoved| autocommand event
452452 - using |searchpairpos()| to find a matching paren
453+- using |synID()| to detect whether the cursor is in a string or comment
453454 - using |:match| to highlight something
454455 - using a |pattern| to match a specific position in the file.
455456
456457 This should be put in a Vim script file, since it uses script-local variables.
457-Note that it doesn't recognize strings or comments in the text.
458+It skips matches in strings or comments, unless the cursor started in string
459+or comment. This requires syntax highlighting.
458460 >
459461 let s:paren_hl_on = 0
460462 function s:Highlight_Matching_Paren()
@@ -484,8 +486,11 @@
484486 let c = '\['
485487 let c2 = '\]'
486488 endif
489+ let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' .
490+ \ '=~? "string\\|comment"'
491+ execute 'if' s_skip '| let s_skip = 0 | endif'
487492
488- let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags)
493+ let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip)
489494
490495 if m_lnum > 0 && m_lnum >= line('w0') && m_lnum <= line('w$')
491496 exe 'match Search /\(\%' . c_lnum . 'l\%' . c_col .
diff -r 513866ffe6af -r 4b8583e82cb8 runtime/doc/todo.txt
--- a/runtime/doc/todo.txt Fri Feb 17 21:53:23 2006 +0000
+++ b/runtime/doc/todo.txt Sat Feb 18 22:14:51 2006 +0000
@@ -1,4 +1,4 @@
1-*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 17
1+*todo.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -32,52 +32,15 @@
3232
3333 Support WINDOW TABS. Works like several pages, each with their own split
3434 windows. Let's call them "tab pages".
35- - Add tabpage(): returns current tab page number.
36- - ":tabsplit" makes a copy of the current tab page.
37- - Add TabLeavePre and TabEnterPost autocommands
3835 - line at top of frame with tabs.
3936 Add 'tabtext' option, like 'statusline'.
40- - check for E999
37+ - Need to be able to search the windows in inactive tabs, e.g. for the
38+ quickfix window?
4139 - docs:
42- General remark: commands that work on windows only work on the windows
43- in the current tab page. Including :windo.
44- Session file only contains the current tab page.
45- :tabedit
46- :tabfind
47- :tab N
48- :tabs
49- {count}gt
50- :close may close current tab page if there is one window.
51- :tabclose
52- :tabclose N - close tab N
53- :tabonly - close all other tabs.
54- :close and :quit (last window in tab)
55- "gt": Use "1gt" - "99gt" to switch to another tab. "gt" goes to the
56- next one. Hint in docs: To mess with another buffer, without
57- changing the window layout, do this in another tab.
58- 'tabline' values 0/1/2
59- mouse click in tabline:
60- select a tab page
61- X closes current tab page
62- :argall and :ball only opens window for buffers that are not in any
63- window in any tab page
64- :diffoff only works in the current tab page
65- diff works per tab page
66- "vim -p *" opens each file in a separate tab page (up to 10).
67- - add GUI Tabs for some systems.
68- Patch for GTK 1.2 passed on by Christian Michon, 2004 Jan 6.
69- Simple patch for GTK by Luis M (nov 7).
70- - Need to be able to search the windows in inactive tabs, e.g. for the
71- quickfix window.
72-Future enhancements:
73- tab page local variables?
74- tab page local options? 'diffopt' could differ between tab pages.
75- tab page local colors?
40+ Add info to the user manual somewhere.
7641
7742 Crash with X command server (Ciaran McCreesh).
7843
79-Motif: in diff mode dragging one scrollbar doesn't update the other one.
80-
8144 Ctags still hasn't included the patch. Darren is looking for someone to do
8245 maintanance.
8346
@@ -494,6 +457,16 @@
494457 Check if file explorer can handle directory names and links with a single
495458 quote. (Nieko Maatjes, 2005 Jan 4)
496459
460+Future enhancements for tab pages:
461+ - Add GUI Tabs for all systems.
462+ Patch for GTK 1.2 passed on by Christian Michon, 2004 Jan 6.
463+ Simple patch for GTK by Luis M (nov 7).
464+ - ":tabsplit" makes a copy of the current tab page.
465+ - Add local variables for each tab page?
466+ - Add local options for each tab page? E.g., 'diffopt' could differ
467+ between tab pages.
468+ - Add local highlighting for a tab page?
469+
497470
498471 Vi incompatibility:
499472 8 With undo/redo only marks in the changed lines should be changed. Other
diff -r 513866ffe6af -r 4b8583e82cb8 runtime/doc/version7.txt
--- a/runtime/doc/version7.txt Fri Feb 17 21:53:23 2006 +0000
+++ b/runtime/doc/version7.txt Sat Feb 18 22:14:51 2006 +0000
@@ -1,4 +1,4 @@
1-*version7.txt* For Vim version 7.0aa. Last change: 2006 Feb 17
1+*version7.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1707,4 +1707,7 @@
17071707 When "umask" is set such that nothing is writable then the viminfo file would
17081708 be written without write permission. (Julian Bridle)
17091709
1710+Motif: In diff mode dragging one scrollbar didn't update the scrollbar of the
1711+other diff'ed window.
1712+
17101713 vim:tw=78:ts=8:ft=help:norl:
diff -r 513866ffe6af -r 4b8583e82cb8 runtime/doc/windows.txt
--- a/runtime/doc/windows.txt Fri Feb 17 21:53:23 2006 +0000
+++ b/runtime/doc/windows.txt Sat Feb 18 22:14:51 2006 +0000
@@ -1,4 +1,4 @@
1-*windows.txt* For Vim version 7.0aa. Last change: 2006 Jan 27
1+*windows.txt* For Vim version 7.0aa. Last change: 2006 Feb 18
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -68,6 +68,9 @@
6868 Note: All CTRL-W commands can also be executed with |:wincmd|, for those
6969 places where a Normal mode command can't be used or is inconvenient.
7070
71+The main Vim window can hold several split windows. There are also tab pages
72+|tab-page|, each of which can hold multiple windows.
73+
7174 ==============================================================================
7275 2. Starting Vim *windows-starting*
7376
@@ -255,6 +258,9 @@
255258 :clo[se][!] Close current window. When the 'hidden' option is set, or
256259 when the buffer was changed and the [!] is used, the buffer
257260 becomes hidden (unless there is another window editing it).
261+ When there is only one window in the current tab page and
262+ there is another tab page, this closes the current tab page.
263+ |tab-page|.
258264 This command fails when: *E444*
259265 - There is only one window on the screen.
260266 - When 'hidden' is not set, [!] is not used, the buffer has
@@ -271,6 +277,8 @@
271277 :hid[e] Quit current window, unless it is the last window on the
272278 screen. The buffer becomes hidden (unless there is another
273279 window editing it or 'bufhidden' is "unload" or "delete").
280+ If the window is the last one in the current tab page the tab
281+ page is closed. |tab-page|
274282 The value of 'hidden' is irrelevant for this command.
275283 Changes to the buffer are not written and won't get lost, so
276284 this is a "safe" command.
@@ -551,6 +559,7 @@
551559 Rearrange the screen to open one window for each argument.
552560 All other windows are closed. When a count is given, this is
553561 the maximum number of windows to open.
562+ Only uses the current tab page |tab-page|.
554563 When the 'hidden' option is set, all buffers in closed windows
555564 become hidden.
556565 When 'hidden' is not set, and the 'autowrite' option is set,
@@ -620,7 +629,8 @@
620629 CTRL-W w
621630 :{cmd}
622631 etc.
623-< When an error is detected on one window, further
632+< This only works in the current tab page.
633+ When an error is detected on one window, further
624634 windows will not be visited.
625635 The last window (or where an error occurred) becomes
626636 the current window.
@@ -1073,6 +1083,7 @@
10731083 of windows opened ('winwidth' if |:vertical| was prepended).
10741084 Buf/Win Enter/Leave autocommands are not executed for the new
10751085 windows here, that's only done when they are really entered.
1086+ Only uses the current tab page |tab-page|.
10761087
10771088 Note: All the commands above that start editing another buffer, keep the
10781089 'readonly' flag as it was. This differs from the ":edit" command, which sets
diff -r 513866ffe6af -r 4b8583e82cb8 src/INSTALLmac.txt
--- a/src/INSTALLmac.txt Fri Feb 17 21:53:23 2006 +0000
+++ b/src/INSTALLmac.txt Sat Feb 18 22:14:51 2006 +0000
@@ -36,13 +36,16 @@
3636 directory. You can move this bundle (the Vim.app directory) anywhere
3737 you want, for example, /Applications.
3838
39+ You need at least Xcode 1.5 to compile Vim 7.0.
40+
41+
3942 1.2 X-Windows or Plain Text
4043
4144 If you do not want the Carbon interface, you must explicitly tell
4245 configure to use a different GUI.
4346
4447 cd ..
45- ./configure --enable-gui=gtk2
48+ ./configure --disable-darwin --enable-gui=gtk2
4649 make; make install
4750
4851 NOTE: The following GUI options are supported:
diff -r 513866ffe6af -r 4b8583e82cb8 src/Makefile
--- a/src/Makefile Fri Feb 17 21:53:23 2006 +0000
+++ b/src/Makefile Sat Feb 18 22:14:51 2006 +0000
@@ -1510,6 +1510,8 @@
15101510 $(ALL_GUI_PRO) \
15111511 $(TCL_PRO)
15121512
1513+ICON_APP = gui_mac.icns
1514+
15131515 PRO_MANUAL = os_amiga.pro os_msdos.pro os_win16.pro os_win32.pro \
15141516 os_mswin.pro os_beos.pro os_vms.pro os_riscos.pro $(PERL_PRO)
15151517
@@ -2131,6 +2133,10 @@
21312133 cp config.mk.dist $(SHADOWDIR)
21322134 mkdir $(SHADOWDIR)/xxd
21332135 cd $(SHADOWDIR)/xxd; ln -s ../../xxd/*.[ch] ../../xxd/Make* .
2136+ if test -f $(ICON_APP); then \
2137+ cd $(SHADOWDIR); \
2138+ ln -s ../$(ICON_APP) ../os_mac.rsr.hqx ../dehqx.py .; \
2139+ fi
21342140 mkdir $(SHADOWDIR)/testdir
21352141 cd $(SHADOWDIR)/testdir; ln -s ../../testdir/Makefile \
21362142 ../../testdir/vimrc.unix \
@@ -2494,7 +2500,6 @@
24942500 -DAPP_VER=$(VERSION) -DICON_APP=$(ICON_APP)
24952501
24962502 ### Icons
2497-ICON_APP = gui_mac.icns
24982503 ICONS = $(RESDIR)/$(ICON_APP)
24992504
25002505 # If you uncomment the following lines the *.icns in the src directory will be
diff -r 513866ffe6af -r 4b8583e82cb8 src/edit.c
--- a/src/edit.c Fri Feb 17 21:53:23 2006 +0000
+++ b/src/edit.c Sat Feb 18 22:14:51 2006 +0000
@@ -114,7 +114,6 @@
114114 static pos_T compl_startpos;
115115 static colnr_T compl_col = 0; /* column where the text starts
116116 * that is being completed */
117-static int save_sm = -1;
118117 static char_u *compl_orig_text = NULL; /* text as it was before
119118 * completion started */
120119 static int compl_cont_mode = 0;
@@ -2733,11 +2732,19 @@
27332732 compl_pattern = NULL;
27342733 vim_free(compl_leader);
27352734 compl_leader = NULL;
2736- save_sm = -1;
27372735 edit_submode_extra = NULL;
27382736 }
27392737
27402738 /*
2739+ * Return TRUE when Insert completion is active.
2740+ */
2741+ int
2742+ins_compl_active()
2743+{
2744+ return compl_started;
2745+}
2746+
2747+/*
27412748 * Delete one character before the cursor and show the subset of the matches
27422749 * that match the word that is now before the cursor.
27432750 * Returns TRUE if the work is done and another char to be got from the user.
@@ -3071,8 +3078,6 @@
30713078 compl_matches = 0;
30723079 msg_clr_cmdline(); /* necessary for "noshowmode" */
30733080 ctrl_x_mode = 0;
3074- if (save_sm >= 0)
3075- p_sm = save_sm;
30763081 if (edit_submode != NULL)
30773082 {
30783083 edit_submode = NULL;
@@ -3904,10 +3909,6 @@
39043909 {
39053910 /* First time we hit ^N or ^P (in a row, I mean) */
39063911
3907- /* Turn off 'sm' so we don't show matches with ^X^L */
3908- save_sm = p_sm;
3909- p_sm = FALSE;
3910-
39113912 did_ai = FALSE;
39123913 #ifdef FEAT_SMARTINDENT
39133914 did_si = FALSE;
diff -r 513866ffe6af -r 4b8583e82cb8 src/eval.c
--- a/src/eval.c Fri Feb 17 21:53:23 2006 +0000
+++ b/src/eval.c Sat Feb 18 22:14:51 2006 +0000
@@ -621,6 +621,7 @@
621621 static void f_synIDattr __ARGS((typval_T *argvars, typval_T *rettv));
622622 static void f_synIDtrans __ARGS((typval_T *argvars, typval_T *rettv));
623623 static void f_system __ARGS((typval_T *argvars, typval_T *rettv));
624+static void f_tabpagenr __ARGS((typval_T *argvars, typval_T *rettv));
624625 static void f_taglist __ARGS((typval_T *argvars, typval_T *rettv));
625626 static void f_tagfiles __ARGS((typval_T *argvars, typval_T *rettv));
626627 static void f_tempname __ARGS((typval_T *argvars, typval_T *rettv));
@@ -6983,6 +6984,7 @@
69836984 {"synIDattr", 2, 3, f_synIDattr},
69846985 {"synIDtrans", 1, 1, f_synIDtrans},
69856986 {"system", 1, 2, f_system},
6987+ {"tabpagenr", 0, 1, f_tabpagenr},
69866988 {"tagfiles", 0, 0, f_tagfiles},
69876989 {"taglist", 1, 1, f_taglist},
69886990 {"tempname", 0, 0, f_tempname},
@@ -14868,6 +14870,40 @@
1486814870 }
1486914871
1487014872 /*
14873+ * "tabpagenr()" function
14874+ */
14875+/* ARGSUSED */
14876+ static void
14877+f_tabpagenr(argvars, rettv)
14878+ typval_T *argvars;
14879+ typval_T *rettv;
14880+{
14881+ int nr = 1;
14882+#ifdef FEAT_WINDOWS
14883+ tabpage_T *tp;
14884+ char_u *arg;
14885+
14886+ if (argvars[0].v_type != VAR_UNKNOWN)
14887+ {
14888+ arg = get_tv_string_chk(&argvars[0]);
14889+ nr = 0;
14890+ if (arg != NULL)
14891+ {
14892+ if (STRCMP(arg, "$") == 0)
14893+ for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
14894+ ++nr;
14895+ else
14896+ EMSG2(_(e_invexpr2), arg);
14897+ }
14898+ }
14899+ else
14900+ for (tp = first_tabpage; tp != curtab; tp = tp->tp_next)
14901+ ++nr;
14902+#endif
14903+ rettv->vval.v_number = nr;
14904+}
14905+
14906+/*
1487114907 * "tagfiles()" function
1487214908 */
1487314909 /*ARGSUSED*/
diff -r 513866ffe6af -r 4b8583e82cb8 src/ex_cmds.h
--- a/src/ex_cmds.h Fri Feb 17 21:53:23 2006 +0000
+++ b/src/ex_cmds.h Sat Feb 18 22:14:51 2006 +0000
@@ -884,6 +884,8 @@
884884 EX(CMD_tabedit, "tabedit", ex_tabedit,
885885 BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR),
886886 EX(CMD_tabfind, "tabfind", ex_tabedit,
887+ BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|NEEDARG|TRLBAR),
888+EX(CMD_tabnew, "tabnew", ex_tabedit,
887889 BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR),
888890 EX(CMD_tabonly, "tabonly", ex_tabonly,
889891 TRLBAR|CMDWIN),
diff -r 513866ffe6af -r 4b8583e82cb8 src/ex_docmd.c
--- a/src/ex_docmd.c Fri Feb 17 21:53:23 2006 +0000
+++ b/src/ex_docmd.c Sat Feb 18 22:14:51 2006 +0000
@@ -6228,7 +6228,7 @@
62286228 else
62296229 # endif
62306230 if (first_tabpage->tp_next == NULL)
6231- EMSG(_("E999: Cannot close last tab page"));
6231+ EMSG(_("E784: Cannot close last tab page"));
62326232 else
62336233 {
62346234 if (eap->addr_count > 0)
@@ -6239,7 +6239,7 @@
62396239 beep_flush();
62406240 return;
62416241 }
6242- if (tp->tp_topframe != topframe)
6242+ if (tp != curtab)
62436243 {
62446244 tabpage_close_other(tp, eap->forceit);
62456245 return;
@@ -6975,9 +6975,10 @@
69756975 }
69766976
69776977 /*
6978- * :tabedit [[+command] file] open new Tab page with empty window
6979- * :tabedit [[+command] file] open new Tab page and edit "file"
6980- * :tabfind [[+command] file] open new Tab page and find "file"
6978+ * :tabedit open new Tab page with empty window
6979+ * :tabedit [+command] file open new Tab page and edit "file"
6980+ * :tabnew [[+command] file] just like :tabedit
6981+ * :tabfind [+command] file open new Tab page and find "file"
69816982 */
69826983 void
69836984 ex_tabedit(eap)
@@ -10626,6 +10627,11 @@
1062610627 eap->errmsg = e_trailing;
1062710628 return;
1062810629 }
10630+ if (*end != *p)
10631+ {
10632+ EMSG2(_(e_invarg2), p);
10633+ return;
10634+ }
1062910635
1063010636 c = *end;
1063110637 *end = NUL;
diff -r 513866ffe6af -r 4b8583e82cb8 src/fileio.c
--- a/src/fileio.c Fri Feb 17 21:53:23 2006 +0000
+++ b/src/fileio.c Sat Feb 18 22:14:51 2006 +0000
@@ -6960,8 +6960,10 @@
69606960 {"SpellFileMissing",EVENT_SPELLFILEMISSING},
69616961 {"StdinReadPost", EVENT_STDINREADPOST},
69626962 {"StdinReadPre", EVENT_STDINREADPRE},
6963+ {"SwapExists", EVENT_SWAPEXISTS},
69636964 {"Syntax", EVENT_SYNTAX},
6964- {"SwapExists", EVENT_SWAPEXISTS},
6965+ {"TabEnterPost", EVENT_TABENTERPOST},
6966+ {"TabLeavePre", EVENT_TABLEAVEPRE},
69656967 {"TermChanged", EVENT_TERMCHANGED},
69666968 {"TermResponse", EVENT_TERMRESPONSE},
69676969 {"User", EVENT_USER},
diff -r 513866ffe6af -r 4b8583e82cb8 src/gui.c
--- a/src/gui.c Fri Feb 17 21:53:23 2006 +0000
+++ b/src/gui.c Sat Feb 18 22:14:51 2006 +0000
@@ -3598,14 +3598,9 @@
35983598 * have both a left and right scrollbar, and we drag one of them, we still
35993599 * need to update the other one.
36003600 */
3601- if ( (gui.dragged_sb == SBAR_LEFT
3602- || gui.dragged_sb == SBAR_RIGHT)
3603- && (!gui.which_scrollbars[SBAR_LEFT]
3604- || !gui.which_scrollbars[SBAR_RIGHT])
3605- && !force)
3606- return;
3607-
3608- if (!force && (gui.dragged_sb == SBAR_LEFT || gui.dragged_sb == SBAR_RIGHT))
3601+ if (!force && (gui.dragged_sb == SBAR_LEFT || gui.dragged_sb == SBAR_RIGHT)
3602+ && gui.which_scrollbars[SBAR_LEFT]
3603+ && gui.which_scrollbars[SBAR_RIGHT])
36093604 {
36103605 /*
36113606 * If we have two scrollbars and one of them is being dragged, just
@@ -3618,7 +3613,6 @@
36183613 gui.dragged_wp->w_scrollbars[0].value,
36193614 gui.dragged_wp->w_scrollbars[0].size,
36203615 gui.dragged_wp->w_scrollbars[0].max);
3621- return;
36223616 }
36233617
36243618 /* avoid that moving components around generates events */
@@ -3628,6 +3622,12 @@
36283622 {
36293623 if (wp->w_buffer == NULL) /* just in case */
36303624 continue;
3625+ /* Skip a scrollbar that is being dragged. */
3626+ if (!force && (gui.dragged_sb == SBAR_LEFT
3627+ || gui.dragged_sb == SBAR_RIGHT)
3628+ && gui.dragged_wp == wp)
3629+ continue;
3630+
36313631 #ifdef SCROLL_PAST_END
36323632 max = wp->w_buffer->b_ml.ml_line_count - 1;
36333633 #else
@@ -3759,11 +3759,12 @@
37593759 #endif
37603760 sb->size = size;
37613761 sb->max = max;
3762- if (gui.which_scrollbars[SBAR_LEFT] && gui.dragged_sb != SBAR_LEFT)
3762+ if (gui.which_scrollbars[SBAR_LEFT]
3763+ && (gui.dragged_sb != SBAR_LEFT || gui.dragged_wp != wp))
37633764 gui_mch_set_scrollbar_thumb(&wp->w_scrollbars[SBAR_LEFT],
37643765 val, size, max);
37653766 if (gui.which_scrollbars[SBAR_RIGHT]
3766- && gui.dragged_sb != SBAR_RIGHT)
3767+ && (gui.dragged_sb != SBAR_RIGHT || gui.dragged_wp != wp))
37673768 gui_mch_set_scrollbar_thumb(&wp->w_scrollbars[SBAR_RIGHT],
37683769 val, size, max);
37693770 }
diff -r 513866ffe6af -r 4b8583e82cb8 src/main.c
--- a/src/main.c Fri Feb 17 21:53:23 2006 +0000
+++ b/src/main.c Sat Feb 18 22:14:51 2006 +0000
@@ -1710,15 +1710,6 @@
17101710 #endif
17111711 break;
17121712
1713-#ifdef TARGET_API_MAC_OSX
1714- /* For some reason on MacOS X, an argument like:
1715- -psn_0_10223617 is passed in when invoke from Finder
1716- or with the 'open' command */
1717- case 'p':
1718- argv_idx = -1; /* bypass full -psn */
1719- main_start_gui();
1720- break;
1721-#endif
17221713 case 'M': /* "-M" no changes or writing of files */
17231714 reset_modifiable();
17241715 /* FALLTHROUGH */
@@ -1743,6 +1734,17 @@
17431734 break;
17441735
17451736 case 'p': /* "-p[N]" open N tab pages */
1737+#ifdef TARGET_API_MAC_OSX
1738+ /* For some reason on MacOS X, an argument like:
1739+ -psn_0_10223617 is passed in when invoke from Finder
1740+ or with the 'open' command */
1741+ if (argv[0][argv_idx] == 's')
1742+ {
1743+ argv_idx = -1; /* bypass full -psn */
1744+ main_start_gui();
1745+ break;
1746+ }
1747+#endif
17461748 #ifdef FEAT_WINDOWS
17471749 /* default is 0: open window for each file */
17481750 parmp->window_count = get_number_arg((char_u *)argv[0],
diff -r 513866ffe6af -r 4b8583e82cb8 src/misc1.c
--- a/src/misc1.c Fri Feb 17 21:53:23 2006 +0000
+++ b/src/misc1.c Sat Feb 18 22:14:51 2006 +0000
@@ -2034,6 +2034,9 @@
20342034 #ifdef FEAT_MBYTE
20352035 && charlen == 1
20362036 #endif
2037+#ifdef FEAT_INS_EXPAND
2038+ && !ins_compl_active()
2039+#endif
20372040 )
20382041 showmatch(c);
20392042
diff -r 513866ffe6af -r 4b8583e82cb8 src/proto/edit.pro
--- a/src/proto/edit.pro Fri Feb 17 21:53:23 2006 +0000
+++ b/src/proto/edit.pro Sat Feb 18 22:14:51 2006 +0000
@@ -12,6 +12,7 @@
1212 void ins_compl_show_pum __ARGS((void));
1313 char_u *find_word_start __ARGS((char_u *ptr));
1414 char_u *find_word_end __ARGS((char_u *ptr));
15+int ins_compl_active __ARGS((void));
1516 void ins_compl_check_keys __ARGS((int frequency));
1617 int get_literal __ARGS((void));
1718 void insertchar __ARGS((int c, int flags, int second_indent));
diff -r 513866ffe6af -r 4b8583e82cb8 src/screen.c
--- a/src/screen.c Fri Feb 17 21:53:23 2006 +0000
+++ b/src/screen.c Sat Feb 18 22:14:51 2006 +0000
@@ -2516,6 +2516,7 @@
25162516 long v;
25172517
25182518 int char_attr = 0; /* attributes for next character */
2519+ int attr_pri = FALSE; /* char_attr has priority */
25192520 int area_highlighting = FALSE; /* Visual or incsearch highlighting
25202521 in this line */
25212522 int attr = 0; /* attributes for area highlighting */
@@ -2764,7 +2765,7 @@
27642765 }
27652766
27662767 /*
2767- * handle 'insearch' and ":s///c" highlighting
2768+ * handle 'incsearch' and ":s///c" highlighting
27682769 */
27692770 else
27702771 #endif /* FEAT_VISUAL */
@@ -3287,14 +3288,7 @@
32873288 else if (area_attr != 0
32883289 && (vcol == tocol
32893290 || (noinvcur && (colnr_T)vcol == wp->w_virtcol)))
3290-#ifdef LINE_ATTR
3291- area_attr = line_attr; /* stop highlighting */
3292- else if (line_attr && ((fromcol == -10 && tocol == MAXCOL)
3293- || (vcol < fromcol || vcol > tocol)))
3294- area_attr = line_attr;
3295-#else
32963291 area_attr = 0; /* stop highlighting */
3297-#endif
32983292
32993293 #ifdef FEAT_SEARCH_EXTRA
33003294 if (!n_extra)
@@ -3370,33 +3364,40 @@
33703364 }
33713365 #endif
33723366
3373- if (area_attr != 0)
3374- char_attr = area_attr;
3375-#ifdef FEAT_SYN_HL
3376- else if (search_attr == 0 && has_syntax)
3377- char_attr = syntax_attr;
3378-#endif
3379- else
3380- char_attr = search_attr;
3381-
33823367 #ifdef FEAT_DIFF
3383- if (diff_hlf != (hlf_T)0 && n_extra == 0)
3368+ if (diff_hlf != (hlf_T)0)
33843369 {
33853370 if (diff_hlf == HLF_CHD && ptr - line >= change_start)
33863371 diff_hlf = HLF_TXD; /* changed text */
33873372 if (diff_hlf == HLF_TXD && ptr - line > change_end)
33883373 diff_hlf = HLF_CHD; /* changed line */
3389- if (attr == 0 || area_attr != attr)
3390- area_attr = hl_attr(diff_hlf);
3391- if (attr == 0 || char_attr != attr)
3392- {
3393- if (search_attr != 0)
3394- char_attr = search_attr;
3395- else
3396- char_attr = hl_attr(diff_hlf);
3397- }
3398- }
3399-#endif
3374+ line_attr = hl_attr(diff_hlf);
3375+ }
3376+#endif
3377+
3378+ /* Decide which of the highlight attributes to use. */
3379+ attr_pri = TRUE;
3380+ if (area_attr != 0)
3381+ char_attr = area_attr;
3382+ else if (search_attr != 0)
3383+ char_attr = search_attr;
3384+#ifdef LINE_ATTR
3385+ /* Use line_attr when not in the Visual or 'incsearch' area
3386+ * (area_attr may be 0 when "noinvcur" is set). */
3387+ else if (line_attr != 0 && ((fromcol == -10 && tocol == MAXCOL)
3388+ || (vcol < fromcol || vcol >= tocol)))
3389+ char_attr = line_attr;
3390+#endif
3391+ else
3392+ {
3393+ attr_pri = FALSE;
3394+#ifdef FEAT_SYN_HL
3395+ if (has_syntax)
3396+ char_attr = syntax_attr;
3397+ else
3398+#endif
3399+ char_attr = 0;
3400+ }
34003401 }
34013402
34023403 /*
@@ -3727,7 +3728,7 @@
37273728 line = ml_get_buf(wp->w_buffer, lnum, FALSE);
37283729 ptr = line + v;
37293730
3730- if (area_attr == 0 && search_attr == 0)
3731+ if (!attr_pri)
37313732 char_attr = syntax_attr;
37323733 else
37333734 char_attr = hl_combine_attr(syntax_attr, char_attr);
@@ -3740,7 +3741,7 @@
37403741 if (has_spell && v >= word_end && v > cur_checked_col)
37413742 {
37423743 spell_attr = 0;
3743- if (area_attr == 0 && search_attr == 0)
3744+ if (!attr_pri)
37443745 char_attr = syntax_attr;
37453746 if (c != 0 && (!has_syntax || can_spell))
37463747 {
@@ -3813,7 +3814,7 @@
38133814 }
38143815 if (spell_attr != 0)
38153816 {
3816- if (area_attr == 0 && search_attr == 0)
3817+ if (!attr_pri)
38173818 char_attr = hl_combine_attr(char_attr, spell_attr);
38183819 else
38193820 char_attr = hl_combine_attr(spell_attr, char_attr);
@@ -3840,7 +3841,7 @@
38403841 if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ')
38413842 {
38423843 c = lcs_trail;
3843- if (area_attr == 0 && search_attr == 0)
3844+ if (!attr_pri)
38443845 {
38453846 n_attr = 1;
38463847 extra_attr = hl_attr(HLF_8);
@@ -3953,7 +3954,7 @@
39533954 c = ' ';
39543955 lcs_eol_one = -1;
39553956 --ptr; /* put it back at the NUL */
3956- if (area_attr == 0 && search_attr == 0)
3957+ if (!attr_pri)
39573958 {
39583959 extra_attr = hl_attr(HLF_AT);
39593960 n_attr = 1;
@@ -3979,7 +3980,7 @@
39793980 n_extra = byte2cells(c) - 1;
39803981 c_extra = NUL;
39813982 c = *p_extra++;
3982- if (area_attr == 0 && search_attr == 0)
3983+ if (!attr_pri)
39833984 {
39843985 n_attr = n_extra + 1;
39853986 extra_attr = hl_attr(HLF_8);
@@ -4042,8 +4043,7 @@
40424043 /* Don't override visual selection highlighting. */
40434044 if (n_attr > 0
40444045 && draw_state == WL_LINE
4045- && (area_attr == 0 || char_attr != area_attr)
4046- && (search_attr == 0 || char_attr != search_attr))
4046+ && !attr_pri)
40474047 char_attr = extra_attr;
40484048
40494049 #if defined(FEAT_XIM) && defined(FEAT_GUI_GTK)
@@ -4108,8 +4108,7 @@
41084108 else
41094109 mb_utf8 = FALSE; /* don't draw as UTF-8 */
41104110 #endif
4111- if ((area_attr == 0 || char_attr != area_attr)
4112- && (search_attr == 0 || char_attr != search_attr))
4111+ if (!attr_pri)
41134112 {
41144113 saved_attr3 = char_attr; /* save current attr */
41154114 char_attr = hl_attr(HLF_AT); /* later copied to char_attr */
diff -r 513866ffe6af -r 4b8583e82cb8 src/version.h
--- a/src/version.h Fri Feb 17 21:53:23 2006 +0000
+++ b/src/version.h Sat Feb 18 22:14:51 2006 +0000
@@ -36,5 +36,5 @@
3636 #define VIM_VERSION_NODOT "vim70aa"
3737 #define VIM_VERSION_SHORT "7.0aa"
3838 #define VIM_VERSION_MEDIUM "7.0aa ALPHA"
39-#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 17)"
40-#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 17, compiled "
39+#define VIM_VERSION_LONG "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 18)"
40+#define VIM_VERSION_LONG_DATE "VIM - Vi IMproved 7.0aa ALPHA (2006 Feb 18, compiled "
diff -r 513866ffe6af -r 4b8583e82cb8 src/vim.h
--- a/src/vim.h Fri Feb 17 21:53:23 2006 +0000
+++ b/src/vim.h Sat Feb 18 22:14:51 2006 +0000
@@ -347,7 +347,7 @@
347347 /*
348348 * The characters and attributes cached for the screen.
349349 */
350-#define schar_T char_u
350+typedef char_u schar_T;
351351 #ifdef FEAT_SYN_HL
352352 typedef unsigned short sattr_T;
353353 # define MAX_TYPENR 65535
@@ -1109,6 +1109,8 @@
11091109 EVENT_SPELLFILEMISSING, /* spell file missing */
11101110 EVENT_CURSORMOVED, /* cursor was moved */
11111111 EVENT_CURSORMOVEDI, /* cursor was moved in Insert mode */
1112+ EVENT_TABLEAVEPRE, /* before leaving a tab page */
1113+ EVENT_TABENTERPOST, /* after entering a tab page */
11121114 NUM_EVENTS /* MUST be the last one */
11131115 };
11141116
diff -r 513866ffe6af -r 4b8583e82cb8 src/window.c
--- a/src/window.c Fri Feb 17 21:53:23 2006 +0000
+++ b/src/window.c Sat Feb 18 22:14:51 2006 +0000
@@ -46,7 +46,7 @@
4646 #if defined(FEAT_WINDOWS) || defined(PROTO)
4747 static tabpage_T *alloc_tabpage __ARGS((void));
4848 static void free_tabpage __ARGS((tabpage_T *tp));
49-static void leave_tabpage __ARGS((tabpage_T *tp));
49+static int leave_tabpage __ARGS((buf_T *new_curbuf));
5050 static void enter_tabpage __ARGS((tabpage_T *tp, buf_T *old_curbuf));
5151 static void frame_fix_height __ARGS((win_T *wp));
5252 static int frame_minheight __ARGS((frame_T *topfrp, win_T *next_curwin));
@@ -2282,15 +2282,15 @@
22822282 {
22832283 tabpage_T *tp;
22842284
2285- /* Use the next tab page if it exists. */
2286- if (curtab->tp_next != NULL)
2285+ /* Use the next tab page if we are currently at the first one. */
2286+ if (curtab == first_tabpage)
22872287 return curtab->tp_next;
22882288
22892289 /* Find the previous tab page. */
22902290 for (tp = first_tabpage; tp->tp_next != NULL; tp = tp->tp_next)
22912291 if (tp->tp_next == curtab)
2292- return tp;
2293- return first_tabpage;
2292+ break;
2293+ return tp;
22942294 }
22952295
22962296 /*
@@ -2963,7 +2963,11 @@
29632963 return FAIL;
29642964
29652965 /* Remember the current windows in this Tab page. */
2966- leave_tabpage(curtab);
2966+ if (leave_tabpage(NULL) == FAIL)
2967+ {
2968+ vim_free(newtp);
2969+ return FAIL;
2970+ }
29672971 curtab = newtp;
29682972
29692973 /* Create a new empty window. */
@@ -2985,12 +2989,7 @@
29852989 }
29862990
29872991 /* Failed, get back the previous Tab page */
2988- topframe = tp->tp_topframe;
2989- curwin = tp->tp_curwin;
2990- prevwin = tp->tp_prevwin;
2991- firstwin = tp->tp_firstwin;
2992- lastwin = tp->tp_lastwin;
2993- curtab = tp;
2992+ enter_tabpage(curtab, curbuf);
29942993 return FAIL;
29952994 }
29962995
@@ -3060,12 +3059,33 @@
30603059 }
30613060
30623061 /*
3063- * Prepare for leaving the current tab page "tp".
3062+ * Prepare for leaving the current tab page.
3063+ * When autocomands change "curtab" we don't leave the tab page and return
3064+ * FAIL.
3065+ * Careful: When OK is returned need to get a new tab page very very soon!
30643066 */
3065- static void
3066-leave_tabpage(tp)
3067- tabpage_T *tp;
3067+/*ARGSUSED*/
3068+ static int
3069+leave_tabpage(new_curbuf)
3070+ buf_T *new_curbuf; /* what is going to be the new curbuf,
3071+ NULL if unknown */
30683072 {
3073+ tabpage_T *tp = curtab;
3074+
3075+#ifdef FEAT_AUTOCMD
3076+ if (new_curbuf != curbuf)
3077+ {
3078+ apply_autocmds(EVENT_BUFLEAVE, NULL, NULL, FALSE, curbuf);
3079+ if (curtab != tp)
3080+ return FAIL;
3081+ }
3082+ apply_autocmds(EVENT_WINLEAVE, NULL, NULL, FALSE, curbuf);
3083+ if (curtab != tp)
3084+ return FAIL;
3085+ apply_autocmds(EVENT_TABLEAVEPRE, NULL, NULL, FALSE, curbuf);
3086+ if (curtab != tp)
3087+ return FAIL;
3088+#endif
30693089 #if defined(FEAT_GUI)
30703090 /* Remove the scrollbars. They may be added back later. */
30713091 if (gui.in_use)
@@ -3079,6 +3099,7 @@
30793099 tp->tp_old_Columns = Columns;
30803100 firstwin = NULL;
30813101 lastwin = NULL;
3102+ return OK;
30823103 }
30833104
30843105 /*
@@ -3100,6 +3121,8 @@
31003121 prevwin = tp->tp_prevwin;
31013122
31023123 #ifdef FEAT_AUTOCMD
3124+ apply_autocmds(EVENT_TABENTERPOST, NULL, NULL, FALSE, curbuf);
3125+ apply_autocmds(EVENT_WINENTER, NULL, NULL, FALSE, curbuf);
31033126 if (old_curbuf != curbuf)
31043127 apply_autocmds(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf);
31053128 #endif
@@ -3114,10 +3137,10 @@
31143137 /* The tabpage line may have appeared or disappeared, may need to resize
31153138 * the frames for that. When the Vim window was resized need to update
31163139 * frame sizes too. */
3117- if (tp->tp_old_Rows != Rows || old_off != firstwin->w_winrow)
3140+ if (curtab->tp_old_Rows != Rows || old_off != firstwin->w_winrow)
31183141 shell_new_rows();
31193142 #ifdef FEAT_VERTSPLIT
3120- if (tp->tp_old_Columns != Columns && starting == 0)
3143+ if (curtab->tp_old_Columns != Columns && starting == 0)
31213144 shell_new_columns(); /* update window widths */
31223145 #endif
31233146
@@ -3143,20 +3166,16 @@
31433166 goto_tabpage(n)
31443167 int n;
31453168 {
3146- tabpage_T *otp = curtab;
31473169 tabpage_T *tp;
31483170 int i;
31493171
3150- if (otp == NULL)
3151- return;
3152-
31533172 if (n == 0)
31543173 {
31553174 /* No count, go to next tab page, wrap around end. */
3156- if (otp->tp_next == NULL)
3175+ if (curtab->tp_next == NULL)
31573176 tp = first_tabpage;
31583177 else
3159- tp = otp->tp_next;
3178+ tp = curtab->tp_next;
31603179 }
31613180 else
31623181 {
@@ -3171,8 +3190,13 @@
31713190 }
31723191 }
31733192
3174- leave_tabpage(otp);
3175- enter_tabpage(tp, curbuf);
3193+ if (leave_tabpage(tp->tp_curwin->w_buffer) == OK)
3194+ {
3195+ if (valid_tabpage(tp))
3196+ enter_tabpage(tp, curbuf);
3197+ else
3198+ enter_tabpage(curtab, curbuf);
3199+ }
31763200 }
31773201
31783202 /*
Afficher sur ancien navigateur de dépôt.