• R/O
  • SSH

vim: Commit

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


Commit MetaInfo

Revision98a88a884610aa911950623d7cce8d067feda66c (tree)
Time2006-03-21 06:59:49
Authorvimboss
Commitervimboss

Log Message

updated for version 7.0230

Change Summary

Incremental Difference

diff -r c8680debe1cc -r 98a88a884610 runtime/doc/quickfix.txt
--- a/runtime/doc/quickfix.txt Mon Mar 20 21:55:45 2006 +0000
+++ b/runtime/doc/quickfix.txt Mon Mar 20 21:59:49 2006 +0000
@@ -1,4 +1,4 @@
1-*quickfix.txt* For Vim version 7.0aa. Last change: 2006 Mar 19
1+*quickfix.txt* For Vim version 7.0aa. Last change: 2006 Mar 20
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -878,6 +878,7 @@
878878 %W start of a multi-line warning message
879879 %I start of a multi-line informational message
880880 %A start of a multi-line message (unspecified type)
881+ %> for next line start with current pattern again |efm-%>|
881882 %C continuation of a multi-line message
882883 %Z end of a multi-line message
883884 These can be used with '+' and '-', see |efm-ignore| below.
@@ -929,6 +930,17 @@
929930 it also hides line 7 which would trigger a separate error message otherwise.
930931 Error format strings are always parsed pattern by pattern until the first
931932 match occurs.
933+ *efm-%>*
934+The %> item can be used to avoid trying patterns that appear earlier in
935+'errorformat'. This is useful for patterns that match just about anything.
936+For example, if the error looks like this:
937+
938+ Error in line 123 of foo.c: ~
939+ unknown variable "i" ~
940+
941+This can be found with: >
942+ :set efm=xxx,%E%>Error in line %l of %f:,%Z%m
943+Where "xxx" has a pattern that would also match the second line.
932944
933945 Important: There is no memory of what part of the errorformat matched before;
934946 every line in the error file gets a complete new run through the error format
diff -r c8680debe1cc -r 98a88a884610 runtime/doc/todo.txt
--- a/runtime/doc/todo.txt Mon Mar 20 21:55:45 2006 +0000
+++ b/runtime/doc/todo.txt Mon Mar 20 21:59:49 2006 +0000
@@ -1,4 +1,4 @@
1-*todo.txt* For Vim version 7.0aa. Last change: 2006 Mar 19
1+*todo.txt* For Vim version 7.0aa. Last change: 2006 Mar 20
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -30,15 +30,23 @@
3030 *known-bugs*
3131 -------------------- Known bugs and current work -----------------------
3232
33-'errorformat': Add a flag %? to check for a match with the next item first.
34-Helps for continuation lines that may contain just about anything, e.g. an
35-error message.
36- error 99 in file foo.c line 1234:
37- something is wrong here
33+Links in docs to vimball docs.
3834
39-Gnome GUI: lots of error messages during startup. These go away when not
40-using the notebook for tab labels. Still similar error messages when moving
41-the toolbar to another location.
35+HTML indenting can be slow, find out why.
36+Add a function to get the current time in usec. reltime([start, [end]])
37+ reltime().sec == seconds, reltime().usec = microseconds
38+ reltime(start) current time relative to [start]
39+ echo timestring(reltime(start), 3) (3 is nr of digits after dot)
40+ reltime(start, end) difference between start and end
41+
42+Include GetLatestVimScripts script?
43+
44+Adjust src/main.aap for installing manpages like in Makefile.
45+ And for generating Vim.app for the Mac.
46+ Install spell files with src/main.aap.
47+
48+Gnome2: When moving the toolbar out of the dock, so that it becomes floating,
49+it can no longer be moved.
4250
4351 Win32: Describe how to do debugging. (George Reilly)
4452
@@ -51,28 +59,8 @@
5159 - With 'nopaste' pasting is wrong, with 'paste' Command-V doesn't work.
5260 (Alan Schmitt)
5361
54-EMBEDDING: Make it possible to run Vim inside a window of another program.
55-For GTK Neil Bird has a patch to use Vim like a widget.
56-
57-Ctags still hasn't included the patch. Darren is looking for someone to do
58-maintenance. Is there another solution?
59-
60-HTML indenting can be slow, find out why.
61-Add a function to get the current time in usec. reltime([start, [end]])
62- reltime().sec == seconds, reltime().usec = microseconds
63- reltime(start) current time relative to [start]
64- echo timestring(reltime(start), 3) (3 is nr of digits after dot)
65- reltime(start, end) difference between start and end
66-Profiling:
67- - :profile pause
68- - :profile resume
69-
70-Adjust src/main.aap for installing manpages like in Makefile.
71- And for generating Vim.app for the Mac.
72- Install spell files with src/main.aap.
73-
74-Add ":smap", Select mode mapping? Otherwise: ":sunmap", so that Visual mode
75-mappings for normal keys can be removed from Select mode.
62+Darren is including the patch in ctags. Test it when it's ready. Change
63+"typename" to "typeref" in C complete code.
7664
7765 Add more tests for all new functionality in Vim 7. Especially new functions.
7866
@@ -81,7 +69,6 @@
8169
8270
8371 Awaiting updated patches:
84-7 Updated Ruby interface. (Ryan Paul)
8572 8 Add ":n" to fnamemodify(): normalize path, remove "../" when possible.
8673 Aric Blumer has a patch for this.
8774 He will update the patch for 6.3.
@@ -1446,7 +1433,6 @@
14461433 7 CTRL-] checks the highlight group for finding out what the tag is.
14471434 7 Add an explanation how a list of words can be used to highlight misspelled
14481435 words.
1449-7 Command line completion for ":find" should search in 'path'.
14501436 8 Add more command line completion for :syntax.
14511437 8 Add more command line completion for :highlight.
14521438 8 Add more command line completion for :sign.
diff -r c8680debe1cc -r 98a88a884610 runtime/doc/version7.txt
--- a/runtime/doc/version7.txt Mon Mar 20 21:55:45 2006 +0000
+++ b/runtime/doc/version7.txt Mon Mar 20 21:59:49 2006 +0000
@@ -1,4 +1,4 @@
1-*version7.txt* For Vim version 7.0aa. Last change: 2006 Mar 18
1+*version7.txt* For Vim version 7.0aa. Last change: 2006 Mar 20
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -36,6 +36,7 @@
3636 Remote file explorer |new-netrw-explore|
3737 Define an operator |new-define-operator|
3838 Mapping to an expression |new-map-expression|
39+Visual and Select mode mappings |new-map-select|
3940 Location list |new-location-list|
4041 Various new items |new-items-7|
4142
@@ -143,6 +144,10 @@
143144 reported, relative to the function start. This also means that line numbers
144145 for ":breakadd func" are different.
145146
147+When defining a user command with |:command| the special items could be
148+abbreviated. This caused unexpected behavior, such as <li> being recognized
149+as <line1>. The items can no longer be abbreviated.
150+
146151 ==============================================================================
147152 NEW FEATURES *new-7*
148153
@@ -161,8 +166,8 @@
161166 variable. Works for Numbers, Strings and composites of them. Then |eval()|
162167 can be used to turn the string back into the variable value.
163168
164-The |:let| command can now use ":let var += expr" like using ":let var = var +
165-expr". "-=" and ".=" works in a similar way.
169+The |:let| command can now use "+=". ":let var += expr" works like
170+":let var = var + expr". "-=" and ".=" works in a similar way.
166171
167172 With the |:profile| command you can find out where your function or script
168173 wastes its time.
@@ -493,6 +498,20 @@
493498 Also works for abbreviations. See |:map-<expr>| for the details.
494499
495500
501+Visual and Select mode mappings *new-map-select*
502+-------------------------------
503+
504+Previously Visual mode mappings applied both to Visual and Select mode. With
505+a trick to have the mappings work in Select mode like they would in Visual
506+mode.
507+
508+Commands have been added to define mappings for Visual and Select mode
509+separately: |:xmap| and |:smap|. With the associated "noremap" and "unmap"
510+commands.
511+
512+The same is done for menus: |:xmenu|, |:smenu|, etc.
513+
514+
496515 Location list *new-location-list*
497516 -------------
498517
@@ -1103,6 +1122,13 @@
11031122 window.
11041123
11051124 Added the "%s" item to 'errorformat'. (Yegappan Lakshmanan)
1125+Added the "%>" item to 'errorformat'.
1126+
1127+For 'errorformat' it was not possible to have a file name that contains the
1128+character that follows after "%f". For example, in "%f:%l:%m" the file name
1129+could not contain ":". Now include the first ":" where the rest of the
1130+pattern matches. In the example a ":" not followed by a line number is
1131+included in the file name. (suggested by Emanuele Giaquinta)
11061132
11071133 GTK GUI: use the GTK file dialog when it's available. Mix from patches by
11081134 Grahame Bowland and Evan Webb.
@@ -1133,12 +1159,6 @@
11331159 Win32: Balloons can have multiple lines if common controls supports it.
11341160 (Sergey Khorev)
11351161
1136-For 'errorformat' it was not possible to have a file name that contains the
1137-character that follows after "%f". For example, in "%f:%l:%m" the file name
1138-could not contain ":". Now include the first ":" where the rest of the
1139-pattern matches. In the example a ":" not followed by a line number is
1140-included in the file name. (suggested by Emanuele Giaquinta)
1141-
11421162 For command-line completion the matches for various types of arguments are now
11431163 sorted: user commands, variables, syntax names, etc.
11441164
@@ -1233,6 +1253,8 @@
12331253 $VIM if it's set. Example provided by Mathias Michaelis.
12341254 Also create a vimtutor.bat batch file.
12351255
1256+The 'balloonexpr' option is now |global-local|.
1257+
12361258 ==============================================================================
12371259 COMPILE TIME CHANGES *compile-changes-7*
12381260
@@ -1384,9 +1406,6 @@
13841406 VMS: Occasionally CR characters were inserted in the file. Expansion of
13851407 environment variables was not correct. (Zoltan Arpadffy)
13861408
1387-VMS: Improved low level char input (affects just console mode). (Zoltan
1388-Arpadffy)
1389-
13901409 UTF-8: When 'delcombine' is set "dw" only deleted the last combining character
13911410 from the first character of the word.
13921411
@@ -1733,6 +1752,9 @@
17331752 Peek for a character to get any window resize events and fix 'columns' and
17341753 'lines' to undo this.
17351754
1755+When using the GTK plug mechanism, resizing and focus was not working
1756+properly. (Neil Bird)
1757+
17361758 After deleting files from the argument list a session file generated with
17371759 ":mksession" may contain invalid ":next" commands.
17381760
diff -r c8680debe1cc -r 98a88a884610 runtime/doc/vimball.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/runtime/doc/vimball.txt Mon Mar 20 21:59:49 2006 +0000
@@ -0,0 +1,66 @@
1+*vimball.txt* Vimball Archiver Mar 20, 2006
2+Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
3+ (remove NOSPAM from Campbell's email first)
4+Copyright: (c) 2004-2006 by Charles E. Campbell, Jr. *Vimball-copyright*
5+ The VIM LICENSE applies to Vimball.vim, and Vimball.txt
6+ (see |copyright|) except use "Vimball" instead of "Vim".
7+ No warranty, express or implied.
8+ Use At-Your-Own-Risk!
9+
10+==============================================================================
11+1. Contents *vimball* *vimball-contents*
12+
13+ 1. Contents......................................: |vimball-contents|
14+ 2. Vimball Manual................................: |vimball-manual|
15+ 3. Vimball History...............................: |vimball-history|
16+
17+
18+==============================================================================
19+2. Vimball Manual *vimball-manual*
20+
21+ *:MkVimball*
22+ :[range]MkVimball[!] filename
23+
24+ This command takes lines holding a path to files to be included in
25+ your vimball; as an example: >
26+ plugin/something.vim
27+ doc/something.txt
28+< using MkVimball on this range will create a file called
29+ "filename.vba" which can be used by Vimball.vim to re-create these
30+ files. If the "filename.vba" file already exists, then MkVimball
31+ will issue a warning and not create the file.
32+
33+ However, if you use the exclamation point (!), then MkVimball will
34+ create the "filename.vba" file, overwriting it if it already exists.
35+ This behavior resembles that for |:w|.
36+
37+ *vimball-extract*
38+ vim filename.vba
39+
40+ Simply editing a Vimball will cause Vimball.vim to tell the user to
41+ source the file to extract its contents.
42+
43+ Extraction will only proceed if the first line of a putative vimball
44+ file holds the "Vimball Archiver by Charles E. Campbell, Jr., Ph.D."
45+ line.
46+
47+ :VimballList *vimball-vimballlist*
48+
49+ This command will tell Vimball to list the files in the archive, along
50+ with their lengths in lines.
51+
52+
53+==============================================================================
54+3. Vimball History *vimball-history*
55+
56+ 3 : Mar 20, 2006 * removed query, now requires sourcing to be
57+ extracted (:so %). Message to that effect
58+ included.
59+ * :VimballList now shows files that would be
60+ extracted.
61+ 2 : Mar 20, 2006 * query, :UseVimball included
62+ 1 : Mar 20, 2006 * initial release
63+
64+
65+==============================================================================
66+vim:tw=78:ts=8:ft=help:fdm=marker
diff -r c8680debe1cc -r 98a88a884610 runtime/plugin/vimball.vim
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/runtime/plugin/vimball.vim Mon Mar 20 21:59:49 2006 +0000
@@ -0,0 +1,256 @@
1+" vimball : construct a file containing both paths and files
2+" Author: Charles E. Campbell, Jr.
3+" Date: Mar 20, 2006
4+" Version: 3
5+" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
6+" Copyright: (c) 2004-2006 by Charles E. Campbell, Jr.
7+" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
8+" (see |copyright|) except use "Vimball" instead of "Vim".
9+" No warranty, express or implied.
10+" *** *** Use At-Your-Own-Risk! *** ***
11+
12+" ---------------------------------------------------------------------
13+" Load Once: {{{1
14+if &cp || exists("g:loaded_vimball")
15+ finish
16+endif
17+
18+let s:keepcpo = &cpo
19+let g:loaded_vimball = "v3"
20+set cpo&vim
21+
22+" ------------------------------------------------------------------------------
23+" Public Interface: {{{1
24+com! -ra -na=+ -bang MkVimball call s:MkVimball(<line1>,<line2>,<bang>0,<f-args>)
25+com! -na=0 UseVimball call s:Vimball(1)
26+com! -na=0 VimballList call s:Vimball(0)
27+au BufReadPost *.vba echohl WarningMsg | echo "Source this file to extract it! (:so %)" | echohl None
28+
29+" =====================================================================
30+" Functions: {{{1
31+
32+" ---------------------------------------------------------------------
33+" MkVimball: creates a vimball given a list of paths to files {{{2
34+" Vimball Format:
35+" path
36+" filesize
37+" [file]
38+" path
39+" filesize
40+" [file]
41+fun! s:MkVimball(line1,line2,writelevel,vimballname) range
42+" call Dfunc("MkVimball(line1=".a:line1." line2=".a:line2." writelevel=".a:writelevel." vimballname<".a:vimballname.">")
43+ let vbname= substitute(a:vimballname,'\.[^.]*$','','e').'.vba'
44+ if !a:writelevel && filereadable(vbname)
45+ echohl Error | echoerr "(MkVimball) file<".vbname."> exists; use ! to insist" | echohl None
46+" call Dret("MkVimball : file<".vbname."> already exists; use ! to insist")
47+ return
48+ endif
49+
50+ " user option bypass
51+ let eikeep= &ei
52+ set ei=all
53+
54+ let home = substitute(&rtp,',.*$','','')
55+ let curdir = getcwd()
56+ exe "cd ".home
57+
58+ " record current tab, initialize while loop index
59+ let curtabnr = tabpagenr()
60+ let linenr = a:line1
61+" call Decho("curtabnr=".curtabnr)
62+
63+ while linenr <= a:line2
64+ let svfile = getline(linenr)
65+" call Decho("svfile<".svfile.">")
66+
67+ if !filereadable(svfile)
68+ echohl Error | echo "unable to read file<".svfile.">" | echohl None
69+ let &ei= eikeep
70+ exe "cd ".curdir
71+" call Dret("MkVimball")
72+ return
73+ endif
74+
75+ " create/switch to mkvimball tab
76+ if !exists("vbtabnr")
77+ tabnew
78+ silent! file Vimball
79+ let vbtabnr= tabpagenr()
80+ else
81+ exe "tabn ".vbtabnr
82+ endif
83+
84+ let lastline= line("$") + 1
85+ if lastline == 2 && getline("$") == ""
86+ call setline(1,'" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.')
87+ call setline(2,'UseVimball')
88+ call setline(3,'finish')
89+ let lastline= 4
90+ endif
91+ call setline(lastline ,svfile)
92+ call setline(lastline+1,0)
93+ exe "$r ".svfile
94+ call setline(lastline+1,line("$") - lastline - 1)
95+" call Decho("lastline=".lastline." line$=".line("$"))
96+
97+ " restore to normal tab
98+ exe "tabn ".curtabnr
99+ let linenr= linenr + 1
100+ endwhile
101+
102+ " write the vimball
103+ exe "tabn ".vbtabnr
104+ exe "cd ".curdir
105+ if a:really
106+ if a:writelevel
107+ exe "w! ".vbname
108+ else
109+ exe "w ".vbname
110+ endif
111+ endif
112+" call Decho("Vimball<".vbname."> created")
113+ echo "Vimball<".vbname."> created"
114+
115+ " remove the evidence
116+ setlocal nomod bh=wipe
117+ exe "tabn ".curtabnr
118+ exe "tabc ".vbtabnr
119+
120+ " restore options
121+ let &ei= eikeep
122+
123+" call Dret("MkVimball")
124+endfun
125+
126+" ---------------------------------------------------------------------
127+" Vimball: {{{2
128+fun! s:Vimball(really)
129+" call Dfunc("Vimball(really=".a:really.")")
130+
131+ if getline(1) !~ '^" Vimball Archiver by Charles E. Campbell, Jr., Ph.D.$'
132+ echoerr "(Vimball) The current file does not appear to be a Vimball!"
133+" call Dret("Vimball")
134+ return
135+ endif
136+
137+ " initialize
138+ let regakeep = @a
139+ let eikeep = &ei
140+ let vekeep = &ve
141+ let makeep = getpos("'a")
142+ let curtabnr = tabpagenr()
143+ set ei=all ve=all
144+
145+ " set up vimball tab
146+ tabnew
147+ silent! file Vimball
148+ let vbtabnr= tabpagenr()
149+ let didhelp= ""
150+
151+ " go to vim plugin home
152+ let home = substitute(&rtp,',.*$','','')
153+ let curdir = getcwd()
154+" call Decho("exe cd ".home)
155+ exe "cd ".home
156+ let linenr = 4
157+ let filecnt = 0
158+
159+ " give title to listing of (extracted) files from Vimball Archive
160+ if a:really
161+ echohl Title | echomsg "Vimball Archive" | echohl None
162+ else
163+ echohl Title | echomsg "Vimball Archive Listing" | echohl None
164+ endif
165+
166+ " apportion vimball contents to various files
167+" call Decho("exe tabn ".curtabnr)
168+ exe "tabn ".curtabnr
169+" call Decho("linenr=".linenr." line$=".line("$"))
170+ while 1 < linenr && linenr < line("$")
171+ let fname = getline(linenr)
172+ let fsize = getline(linenr+1)
173+ let filecnt = filecnt + 1
174+ if a:really
175+ echomsg "extracted <".fname.">: ".fsize." lines"
176+ else
177+ echomsg "would extract <".fname.">: ".fsize." lines"
178+ endif
179+" call Decho(linenr.": will extract file<".fname.">")
180+" call Decho((linenr+1).": fsize=".fsize)
181+
182+ " make directories if they don't exist yet
183+ let fnamebuf= fname
184+ while fnamebuf =~ '/'
185+ let dirname = substitute(fnamebuf,'/.*$','','e')
186+ let fnamebuf = substitute(fnamebuf,'^.\{-}/\(.*\)$','\1','e')
187+ if !isdirectory(dirname)
188+" call Decho("making <".dirname.">")
189+ call mkdir(dirname)
190+ endif
191+ exe "cd ".dirname
192+ endwhile
193+ exe "cd ".home
194+
195+ " grab specified qty of lines and place into "a" buffer
196+ exe linenr
197+ norm! jjma
198+ exe (linenr + fsize + 1)
199+ silent norm! "ay'a
200+" call Decho("yanked ".fsize." lines into register-a")
201+
202+" call Decho("didhelp<".didhelp."> fname<".fname.">")
203+ if didhelp == "" && fname =~ 'doc/[^/]\+\.txt$'
204+ let didhelp= substitute(fname,'^\(.*\<doc\)[/\\][^.]*\.txt$','\1','e')
205+" call Decho("didhelp<".didhelp.">")
206+ endif
207+
208+ " copy "a" buffer into tab
209+" call Decho('copy "a buffer into tab#'.vbtabnr)
210+ exe "tabn ".vbtabnr
211+ silent! %d
212+ silent norm! "aPGdd1G
213+" call Decho("rega<".@a.">")
214+
215+ " write tab to file
216+" call Decho("exe w! ".fname)
217+ exe "silent w! ".fname
218+
219+" call Decho("exe tabn ".curtabnr)
220+ exe "tabn ".curtabnr
221+" let oldlinenr = linenr " Decho
222+ let linenr = linenr + fsize + 2
223+" call Decho("update linenr= [linenr=".oldlinenr."] + [fsize=".fsize."] + 2 = ".linenr)
224+ endwhile
225+
226+ " set up help
227+" call Decho("about to set up help: didhelp<".didhelp.">")
228+ if didhelp != ""
229+" call Decho("exe helptags ".home."/".didhelp)
230+ exe "helptags ".home."/".didhelp
231+ echomsg "did helptags"
232+ endif
233+
234+ " make sure a "Press ENTER..." prompt appears to keep the messages showing!
235+ while filecnt < &ch
236+ echomsg " "
237+ let filecnt= filecnt + 1
238+ endwhile
239+
240+ " restore events, delete tab and buffer
241+ exe "tabn ".vbtabnr
242+ setlocal nomod bh=wipe
243+ exe "tabn ".curtabnr
244+ exe "tabc ".vbtabnr
245+ let &ei= eikeep
246+ let @a = regakeep
247+ if makeep[0] != 0
248+ " restore mark a
249+" call Decho("restore mark-a: makeep=".string(makeep))
250+ call setpos("'a",makeep)
251+ ka
252+ endif
253+ exe "cd ".curdir
254+
255+" call Dret("Vimball")
256+endfun
diff -r c8680debe1cc -r 98a88a884610 src/eval.c
--- a/src/eval.c Mon Mar 20 21:55:45 2006 +0000
+++ b/src/eval.c Mon Mar 20 21:59:49 2006 +0000
@@ -19382,7 +19382,7 @@
1938219382 }
1938319383 }
1938419384 #ifdef FEAT_PROFILE
19385- if (do_profiling)
19385+ if (do_profiling == PROF_YES)
1938619386 {
1938719387 if (!fp->uf_profiling && has_profiling(FALSE, fp->uf_name, NULL))
1938819388 func_do_profile(fp);
@@ -19417,7 +19417,8 @@
1941719417 }
1941819418
1941919419 #ifdef FEAT_PROFILE
19420- if (fp->uf_profiling || (fc.caller != NULL && &fc.caller->func->uf_profiling))
19420+ if (do_profiling == PROF_YES && (fp->uf_profiling
19421+ || (fc.caller != NULL && &fc.caller->func->uf_profiling)))
1942119422 {
1942219423 profile_end(&fp->uf_tm_start);
1942319424 profile_sub_wait(&wait_start, &fp->uf_tm_start);
@@ -19467,7 +19468,7 @@
1946719468 sourcing_lnum = save_sourcing_lnum;
1946819469 current_SID = save_current_SID;
1946919470 #ifdef FEAT_PROFILE
19470- if (do_profiling)
19471+ if (do_profiling == PROF_YES)
1947119472 script_prof_restore(&wait_start);
1947219473 #endif
1947319474
@@ -19710,7 +19711,7 @@
1971019711 fcp->dbg_tick = debug_tick;
1971119712 }
1971219713 #ifdef FEAT_PROFILE
19713- if (do_profiling)
19714+ if (do_profiling == PROF_YES)
1971419715 func_line_end(cookie);
1971519716 #endif
1971619717
@@ -19731,7 +19732,7 @@
1973119732 retval = vim_strsave(((char_u **)(gap->ga_data))[fcp->linenr++]);
1973219733 sourcing_lnum = fcp->linenr;
1973319734 #ifdef FEAT_PROFILE
19734- if (do_profiling)
19735+ if (do_profiling == PROF_YES)
1973519736 func_line_start(cookie);
1973619737 #endif
1973719738 }
diff -r c8680debe1cc -r 98a88a884610 src/ex_cmds.h
--- a/src/ex_cmds.h Mon Mar 20 21:55:45 2006 +0000
+++ b/src/ex_cmds.h Mon Mar 20 21:59:49 2006 +0000
@@ -821,12 +821,22 @@
821821 EXTRA|BANG|EDITCMD|ARGOPT|TRLBAR),
822822 EX(CMD_smagic, "smagic", ex_submagic,
823823 RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY),
824+EX(CMD_smap, "smap", ex_map,
825+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
826+EX(CMD_smapclear, "smapclear", ex_mapclear,
827+ EXTRA|TRLBAR|CMDWIN),
828+EX(CMD_smenu, "smenu", ex_menu,
829+ RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
824830 EX(CMD_snext, "snext", ex_next,
825831 RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR),
826832 EX(CMD_sniff, "sniff", ex_sniff,
827833 EXTRA|TRLBAR),
828834 EX(CMD_snomagic, "snomagic", ex_submagic,
829835 RANGE|WHOLEFOLD|EXTRA|CMDWIN|MODIFY),
836+EX(CMD_snoremap, "snoremap", ex_map,
837+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
838+EX(CMD_snoremenu, "snoremenu", ex_menu,
839+ RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
830840 EX(CMD_source, "source", ex_source,
831841 BANG|FILE1|TRLBAR|SBOXOK|CMDWIN),
832842 EX(CMD_sort, "sort", ex_sort,
@@ -867,6 +877,10 @@
867877 BANG|TRLBAR|WORD1),
868878 EX(CMD_sunhide, "sunhide", ex_buffer_all,
869879 RANGE|NOTADR|COUNT|TRLBAR),
880+EX(CMD_sunmap, "sunmap", ex_unmap,
881+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
882+EX(CMD_sunmenu, "sunmenu", ex_menu,
883+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
870884 EX(CMD_suspend, "suspend", ex_stop,
871885 TRLBAR|BANG|CMDWIN),
872886 EX(CMD_sview, "sview", ex_splitview,
@@ -1035,6 +1049,20 @@
10351049 RANGE|WHOLEFOLD|BANG|FILE1|ARGOPT|DFLALL|TRLBAR|CMDWIN),
10361050 EX(CMD_xall, "xall", do_wqall,
10371051 BANG|TRLBAR),
1052+EX(CMD_xmap, "xmap", ex_map,
1053+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
1054+EX(CMD_xmapclear, "xmapclear", ex_mapclear,
1055+ EXTRA|TRLBAR|CMDWIN),
1056+EX(CMD_xmenu, "xmenu", ex_menu,
1057+ RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
1058+EX(CMD_xnoremap, "xnoremap", ex_map,
1059+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
1060+EX(CMD_xnoremenu, "xnoremenu", ex_menu,
1061+ RANGE|NOTADR|ZEROR|EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
1062+EX(CMD_xunmap, "xunmap", ex_unmap,
1063+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
1064+EX(CMD_xunmenu, "xunmenu", ex_menu,
1065+ EXTRA|TRLBAR|NOTRLCOM|USECTRLV|CMDWIN),
10381066 EX(CMD_yank, "yank", ex_operators,
10391067 RANGE|WHOLEFOLD|REGSTR|COUNT|TRLBAR|CMDWIN),
10401068 EX(CMD_z, "z", ex_z,
diff -r c8680debe1cc -r 98a88a884610 src/gui_beval.c
--- a/src/gui_beval.c Mon Mar 20 21:55:45 2006 +0000
+++ b/src/gui_beval.c Mon Mar 20 21:59:49 2006 +0000
@@ -28,6 +28,8 @@
2828 char_u *text;
2929 static char_u *result = NULL;
3030 long winnr = 0;
31+ char_u *bexpr;
32+ buf_T *save_curbuf;
3133 #ifdef FEAT_WINDOWS
3234 win_T *cw;
3335 #endif
@@ -39,39 +41,51 @@
3941 return;
4042
4143 #ifdef FEAT_EVAL
42- if (*p_bexpr != NUL
43- && get_beval_info(balloonEval, TRUE, &wp, &lnum, &text, &col) == OK)
44+ if (get_beval_info(balloonEval, TRUE, &wp, &lnum, &text, &col) == OK)
4445 {
46+ bexpr = (*wp->w_buffer->b_p_bexpr == NUL) ? p_bexpr
47+ : wp->w_buffer->b_p_bexpr;
48+ if (*bexpr != NUL)
49+ {
4550 # ifdef FEAT_WINDOWS
46- /* Convert window pointer to number. */
47- for (cw = firstwin; cw != wp; cw = cw->w_next)
48- ++winnr;
51+ /* Convert window pointer to number. */
52+ for (cw = firstwin; cw != wp; cw = cw->w_next)
53+ ++winnr;
4954 # endif
5055
51- set_vim_var_nr(VV_BEVAL_BUFNR, (long)wp->w_buffer->b_fnum);
52- set_vim_var_nr(VV_BEVAL_WINNR, winnr);
53- set_vim_var_nr(VV_BEVAL_LNUM, (long)lnum);
54- set_vim_var_nr(VV_BEVAL_COL, (long)(col + 1));
55- set_vim_var_string(VV_BEVAL_TEXT, text, -1);
56- vim_free(text);
57-
58- use_sandbox = was_set_insecurely((char_u *)"balloonexpr", 0);
59- if (use_sandbox)
60- ++sandbox;
61- ++textlock;
56+ set_vim_var_nr(VV_BEVAL_BUFNR, (long)wp->w_buffer->b_fnum);
57+ set_vim_var_nr(VV_BEVAL_WINNR, winnr);
58+ set_vim_var_nr(VV_BEVAL_LNUM, (long)lnum);
59+ set_vim_var_nr(VV_BEVAL_COL, (long)(col + 1));
60+ set_vim_var_string(VV_BEVAL_TEXT, text, -1);
61+ vim_free(text);
6262
63- vim_free(result);
64- result = eval_to_string(p_bexpr, NULL, TRUE);
63+ /*
64+ * Temporarily change the curbuf, so that we can determine whether
65+ * the buffer-local balloonexpr option was set insecurly.
66+ */
67+ save_curbuf = curbuf;
68+ curbuf = wp->w_buffer;
69+ use_sandbox = was_set_insecurely((char_u *)"balloonexpr",
70+ *curbuf->b_p_bexpr == NUL ? 0 : OPT_LOCAL);
71+ curbuf = save_curbuf;
72+ if (use_sandbox)
73+ ++sandbox;
74+ ++textlock;
6575
66- if (use_sandbox)
67- --sandbox;
68- --textlock;
76+ vim_free(result);
77+ result = eval_to_string(bexpr, NULL, TRUE);
6978
70- set_vim_var_string(VV_BEVAL_TEXT, NULL, -1);
71- if (result != NULL && result[0] != NUL)
72- {
73- gui_mch_post_balloon(beval, result);
74- return;
79+ if (use_sandbox)
80+ --sandbox;
81+ --textlock;
82+
83+ set_vim_var_string(VV_BEVAL_TEXT, NULL, -1);
84+ if (result != NULL && result[0] != NUL)
85+ {
86+ gui_mch_post_balloon(beval, result);
87+ return;
88+ }
7589 }
7690 }
7791 #endif
diff -r c8680debe1cc -r 98a88a884610 src/gui_gtk_x11.c
--- a/src/gui_gtk_x11.c Mon Mar 20 21:55:45 2006 +0000
+++ b/src/gui_gtk_x11.c Mon Mar 20 21:59:49 2006 +0000
@@ -806,9 +806,9 @@
806806 if (blink_state == BLINK_NONE)
807807 gui_mch_start_blink();
808808
809- /* make sure keyboard input goes there */
810- if (gtk_socket_id == 0)
811- gtk_widget_grab_focus(gui.drawarea);
809+ /* make sure keyboard input goes to the draw area (if this is focus for a window) */
810+ if (widget != gui.drawarea)
811+ gtk_widget_grab_focus(gui.drawarea);
812812
813813 return TRUE;
814814 }
@@ -2837,14 +2837,21 @@
28372837 if (using_gnome && widget != NULL)
28382838 {
28392839 # ifdef HAVE_GTK2
2840+ GtkWidget *parent;
28402841 BonoboDockItem *dockitem;
28412842
2842- widget = gtk_widget_get_parent(widget);
2843- dockitem = BONOBO_DOCK_ITEM(widget);
2844-
2845- if (dockitem == NULL || dockitem->is_floating)
2846- return 0;
2847- item_orientation = bonobo_dock_item_get_orientation(dockitem);
2843+ parent = gtk_widget_get_parent(widget);
2844+ if (G_TYPE_FROM_INSTANCE(parent) == BONOBO_TYPE_DOCK_ITEM)
2845+ {
2846+ /* Only menu & toolbar are dock items. Could tabline be?
2847+ * Seem to be only the 2 defined in GNOME */
2848+ widget = parent;
2849+ dockitem = BONOBO_DOCK_ITEM(widget);
2850+
2851+ if (dockitem == NULL || dockitem->is_floating)
2852+ return 0;
2853+ item_orientation = bonobo_dock_item_get_orientation(dockitem);
2854+ }
28482855 # else
28492856 GnomeDockItem *dockitem;
28502857
@@ -2911,16 +2918,39 @@
29112918 return height;
29122919 }
29132920
2921+/* This controls whether we can set the real window hints at
2922+ * start-up when in a GtkPlug.
2923+ * 0 = normal processing (default)
2924+ * 1 = init. hints set, no-one's tried to reset since last check
2925+ * 2 = init. hints set, attempt made to change hints
2926+ */
2927+static int init_window_hints_state = 0;
2928+
29142929 static void
2915-update_window_manager_hints(void)
2930+update_window_manager_hints(int force_width, int force_height)
29162931 {
29172932 static int old_width = 0;
29182933 static int old_height = 0;
2934+ static int old_min_width = 0;
2935+ static int old_min_height = 0;
29192936 static int old_char_width = 0;
29202937 static int old_char_height = 0;
29212938
29222939 int width;
29232940 int height;
2941+ int min_width;
2942+ int min_height;
2943+
2944+ /* At start-up, don't try to set the hints until the initial
2945+ * values have been used (those that dictate our initial size)
2946+ * Let forced (i.e., correct) values thruogh always.
2947+ */
2948+ if (!(force_width && force_height) && init_window_hints_state > 0)
2949+ {
2950+ /* Don't do it! */
2951+ init_window_hints_state = 2;
2952+ return;
2953+ }
29242954
29252955 /* This also needs to be done when the main window isn't there yet,
29262956 * otherwise the hints don't work. */
@@ -2934,9 +2964,28 @@
29342964 height += get_menu_tool_height();
29352965 # endif
29362966
2967+ /* GtkSockets use GtkPlug's [gui,mainwin] min-size hints to determine
2968+ * their actual widget size. When we set our size ourselve (e.g.,
2969+ * 'set columns=' or init. -geom) we briefly set the min. to the size
2970+ * we wish to be instead of the legitimate minimum so that we actually
2971+ * resize correctly.
2972+ */
2973+ if (force_width && force_height)
2974+ {
2975+ min_width = force_width;
2976+ min_height = force_height;
2977+ }
2978+ else
2979+ {
2980+ min_width = width + MIN_COLUMNS * gui.char_width;
2981+ min_height = height + MIN_LINES * gui.char_height;
2982+ }
2983+
29372984 /* Avoid an expose event when the size didn't change. */
29382985 if (width != old_width
29392986 || height != old_height
2987+ || min_width != old_min_width
2988+ || min_height != old_min_height
29402989 || gui.char_width != old_char_width
29412990 || gui.char_height != old_char_height)
29422991 {
@@ -2947,8 +2996,8 @@
29472996 geometry.height_inc = gui.char_height;
29482997 geometry.base_width = width;
29492998 geometry.base_height = height;
2950- geometry.min_width = width + MIN_COLUMNS * gui.char_width;
2951- geometry.min_height = height + MIN_LINES * gui.char_height;
2999+ geometry.min_width = min_width;
3000+ geometry.min_height = min_height;
29523001 geometry_mask = GDK_HINT_BASE_SIZE|GDK_HINT_RESIZE_INC
29533002 |GDK_HINT_MIN_SIZE;
29543003 # ifdef HAVE_GTK2
@@ -2961,10 +3010,12 @@
29613010 gtk_window_set_geometry_hints(GTK_WINDOW(gui.mainwin), gui.formwin,
29623011 &geometry, geometry_mask);
29633012 # endif
2964- old_width = width;
2965- old_height = height;
2966- old_char_width = gui.char_width;
2967- old_char_height = gui.char_height;
3013+ old_width = width;
3014+ old_height = height;
3015+ old_min_width = min_width;
3016+ old_min_height = min_height;
3017+ old_char_width = gui.char_width;
3018+ old_char_height = gui.char_height;
29683019 }
29693020 }
29703021
@@ -3211,7 +3262,7 @@
32113262 {
32123263 /* Note: this may cause a resize event */
32133264 gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gui.tabline), showit);
3214- update_window_manager_hints();
3265+ update_window_manager_hints(0, 0);
32153266 #ifndef HAVE_GTK2
32163267 showing_tabline = showit;
32173268 #endif
@@ -3583,35 +3634,31 @@
35833634 /*
35843635 * Use a Notebook for the tab pages labels. The labels are hidden by
35853636 * default.
3586- * TODO: currently doesn't work for Gnome.
35873637 */
3588- if (!using_gnome)
3589- {
3590- gui.tabline = gtk_notebook_new();
3591- gtk_widget_show(gui.tabline);
3592- gtk_box_pack_start(GTK_BOX(vbox), gui.tabline, FALSE, FALSE, 0);
3593- gtk_notebook_set_show_border(GTK_NOTEBOOK(gui.tabline), FALSE);
3594- gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gui.tabline), FALSE);
3595-
3596- {
3597- GtkWidget *page, *label;
3598-
3599- /* Add the first tab. */
3600- page = gtk_vbox_new(FALSE, 0);
3601- gtk_widget_show(page);
3602- gtk_container_add(GTK_CONTAINER(gui.tabline), page);
3603- label = gtk_label_new("-Empty-");
3604- gtk_widget_show(label);
3605- gtk_notebook_set_tab_label(GTK_NOTEBOOK(gui.tabline), page, label);
3606- }
3607- gtk_signal_connect(GTK_OBJECT(gui.tabline), "switch_page",
3608- GTK_SIGNAL_FUNC(on_select_tab), NULL);
3609-
3610- /* Create a popup menu for the tab line and connect it. */
3611- tabline_menu = create_tabline_menu();
3612- gtk_signal_connect_object(GTK_OBJECT(gui.tabline), "button_press_event",
3613- GTK_SIGNAL_FUNC(on_tabline_menu), GTK_OBJECT(tabline_menu));
3614- }
3638+ gui.tabline = gtk_notebook_new();
3639+ gtk_widget_show(gui.tabline);
3640+ gtk_box_pack_start(GTK_BOX(vbox), gui.tabline, FALSE, FALSE, 0);
3641+ gtk_notebook_set_show_border(GTK_NOTEBOOK(gui.tabline), FALSE);
3642+ gtk_notebook_set_show_tabs(GTK_NOTEBOOK(gui.tabline), FALSE);
3643+
3644+ {
3645+ GtkWidget *page, *label;
3646+
3647+ /* Add the first tab. */
3648+ page = gtk_vbox_new(FALSE, 0);
3649+ gtk_widget_show(page);
3650+ gtk_container_add(GTK_CONTAINER(gui.tabline), page);
3651+ label = gtk_label_new("-Empty-");
3652+ gtk_widget_show(label);
3653+ gtk_notebook_set_tab_label(GTK_NOTEBOOK(gui.tabline), page, label);
3654+ }
3655+ gtk_signal_connect(GTK_OBJECT(gui.tabline), "switch_page",
3656+ GTK_SIGNAL_FUNC(on_select_tab), NULL);
3657+
3658+ /* Create a popup menu for the tab line and connect it. */
3659+ tabline_menu = create_tabline_menu();
3660+ gtk_signal_connect_object(GTK_OBJECT(gui.tabline), "button_press_event",
3661+ GTK_SIGNAL_FUNC(on_tabline_menu), GTK_OBJECT(tabline_menu));
36153662 #endif
36163663
36173664 gui.formwin = gtk_form_new();
@@ -3705,10 +3752,30 @@
37053752 GTK_SIGNAL_FUNC(enter_notify_event), NULL);
37063753 }
37073754
3708- gtk_signal_connect(GTK_OBJECT(gui.mainwin), "focus_out_event",
3709- GTK_SIGNAL_FUNC(focus_out_event), NULL);
3710- gtk_signal_connect(GTK_OBJECT(gui.mainwin), "focus_in_event",
3711- GTK_SIGNAL_FUNC(focus_in_event), NULL);
3755+ /* Real windows can get focus ... GtkPlug, being a mere container can't,
3756+ * only its widgets. Arguably, this could be common code and we not use
3757+ * the window focus at all, but let's be safe.
3758+ */
3759+ if (gtk_socket_id == 0)
3760+ {
3761+ gtk_signal_connect(GTK_OBJECT(gui.mainwin), "focus_out_event",
3762+ GTK_SIGNAL_FUNC(focus_out_event), NULL);
3763+ gtk_signal_connect(GTK_OBJECT(gui.mainwin), "focus_in_event",
3764+ GTK_SIGNAL_FUNC(focus_in_event), NULL);
3765+ }
3766+ else
3767+ {
3768+ gtk_signal_connect(GTK_OBJECT(gui.drawarea), "focus_out_event",
3769+ GTK_SIGNAL_FUNC(focus_out_event), NULL);
3770+ gtk_signal_connect(GTK_OBJECT(gui.drawarea), "focus_in_event",
3771+ GTK_SIGNAL_FUNC(focus_in_event), NULL);
3772+#ifdef FEAT_GUI_TABLINE
3773+ gtk_signal_connect(GTK_OBJECT(gui.tabline), "focus_out_event",
3774+ GTK_SIGNAL_FUNC(focus_out_event), NULL);
3775+ gtk_signal_connect(GTK_OBJECT(gui.tabline), "focus_in_event",
3776+ GTK_SIGNAL_FUNC(focus_in_event), NULL);
3777+#endif /* FEAT_GUI_TABLINE */
3778+ }
37123779
37133780 gtk_signal_connect(GTK_OBJECT(gui.drawarea), "motion_notify_event",
37143781 GTK_SIGNAL_FUNC(motion_notify_event), NULL);
@@ -3793,8 +3860,17 @@
37933860 form_configure_event(GtkWidget *widget, GdkEventConfigure *event,
37943861 gpointer data)
37953862 {
3863+ int usable_height = event->height;
3864+
3865+ /* When in a GtkPlug, we can't guarantee valid heights (as a round
3866+ * no. of char-heights), so we have to manually sanitise them.
3867+ * Widths seem to sort themselves out, don't ask me why.
3868+ */
3869+ if (gtk_socket_id != 0)
3870+ usable_height -= (gui.char_height - (gui.char_height/2)); /* sic. */
3871+
37963872 gtk_form_freeze(GTK_FORM(gui.formwin));
3797- gui_resize_shell(event->width, event->height);
3873+ gui_resize_shell(event->width, usable_height);
37983874 gtk_form_thaw(GTK_FORM(gui.formwin));
37993875
38003876 return TRUE;
@@ -3824,6 +3900,37 @@
38243900 }
38253901 }
38263902
3903+
3904+/*
3905+ * Bit of a hack to ensure we start GtkPlug windows with the correct window
3906+ * hints (and thus the required size from -geom), but that after that we
3907+ * put the hints back to normal (the actual minimum size) so we may
3908+ * subsequently be resized smaller. GtkSocket (the parent end) uses the
3909+ * plug's window 'min hints to set *it's* minum size, but that's also the
3910+ * only way we have of making ourselves bigger (by set lines/columns).
3911+ * Thus set hints at start-up to ensure correct init. size, then a
3912+ * second after the final attempt to reset the real minimum hinst (done by
3913+ * scrollbar init.), actually do the sttandard hinst and stop the timer.
3914+ * We'll not let the default hints be set while this timer's active.
3915+ */
3916+/*ARGSUSED*/
3917+ static gboolean
3918+check_startup_plug_hints(gpointer data)
3919+{
3920+ if (init_window_hints_state == 1)
3921+ {
3922+ /* Safe to use normal hints now */
3923+ init_window_hints_state = 0;
3924+ update_window_manager_hints(0, 0);
3925+ return FALSE; /* stop timer */
3926+ }
3927+
3928+ /* Keep on trying */
3929+ init_window_hints_state = 1;
3930+ return TRUE;
3931+}
3932+
3933+
38273934 /*
38283935 * Open the GUI window which was created by a call to gui_mch_init().
38293936 */
@@ -3887,12 +3994,32 @@
38873994 #endif
38883995 vim_free(gui.geom);
38893996 gui.geom = NULL;
3997+
3998+ /* From now until everyone's stopped trying to set the window hints
3999+ * to their correct minimum values, stop them being set as we need
4000+ * them to remain at our required size for the parent GtkSocket to
4001+ * give us the right initial size.
4002+ */
4003+ if (gtk_socket_id != 0 && (mask & WidthValue || mask & HeightValue))
4004+ {
4005+ guint pixel_width = (guint)(gui_get_base_width() + Columns * gui.char_width);
4006+ guint pixel_height = (guint)(gui_get_base_height() + Rows * gui.char_height);
4007+
4008+#ifdef HAVE_GTK2
4009+ pixel_width += get_menu_tool_width();
4010+ pixel_height += get_menu_tool_height();
4011+#endif
4012+
4013+ update_window_manager_hints(pixel_width, pixel_height);
4014+ init_window_hints_state = 1;
4015+ g_timeout_add(1000, check_startup_plug_hints, NULL);
4016+ }
38904017 }
38914018
38924019 gtk_form_set_size(GTK_FORM(gui.formwin),
38934020 (guint)(gui_get_base_width() + Columns * gui.char_width),
38944021 (guint)(gui_get_base_height() + Rows * gui.char_height));
3895- update_window_manager_hints();
4022+ update_window_manager_hints(0, 0);
38964023
38974024 if (foreground_argument != NULL)
38984025 fg_pixel = gui_get_color((char_u *)foreground_argument);
@@ -4125,17 +4252,25 @@
41254252 /* give GTK+ a chance to put all widget's into place */
41264253 gui_mch_update();
41274254
4255+#ifndef HAVE_GTK2
41284256 /* this will cause the proper resizement to happen too */
4129- update_window_manager_hints();
4130-
4131-#ifdef HAVE_GTK2
4257+ update_window_manager_hints(0, 0);
4258+
4259+#else /* HAVE_GTK2 */
4260+ /* this will cause the proper resizement to happen too */
4261+ if (gtk_socket_id == 0)
4262+ update_window_manager_hints(0, 0);
4263+
41324264 /* With GTK+ 2, changing the size of the form widget doesn't resize
4133- * the window. So lets do it the other way around and resize the
4265+ * the window. So let's do it the other way around and resize the
41344266 * main window instead. */
41354267 width += get_menu_tool_width();
41364268 height += get_menu_tool_height();
41374269
4138- gtk_window_resize(GTK_WINDOW(gui.mainwin), width, height);
4270+ if (gtk_socket_id == 0)
4271+ gtk_window_resize(GTK_WINDOW(gui.mainwin), width, height);
4272+ else
4273+ update_window_manager_hints(width, height);
41394274
41404275 #if 0
41414276 if (!resize_idle_installed)
@@ -4231,7 +4366,7 @@
42314366 else
42324367 gtk_widget_hide(widget);
42334368
4234- update_window_manager_hints();
4369+ update_window_manager_hints(0, 0);
42354370 }
42364371 }
42374372 #endif /* FEAT_MENU */
@@ -4262,7 +4397,7 @@
42624397 else
42634398 gtk_widget_hide(widget);
42644399
4265- update_window_manager_hints();
4400+ update_window_manager_hints(0, 0);
42664401 }
42674402 }
42684403 #endif /* FEAT_TOOLBAR */
@@ -4960,7 +5095,7 @@
49605095 #endif /* !HAVE_GTK2 */
49615096
49625097 /* Preserve the logical dimensions of the screen. */
4963- update_window_manager_hints();
5098+ update_window_manager_hints(0, 0);
49645099
49655100 return OK;
49665101 }
@@ -6577,7 +6712,7 @@
65776712 else
65786713 gtk_widget_hide(sb->id);
65796714
6580- update_window_manager_hints();
6715+ update_window_manager_hints(0, 0);
65816716 }
65826717
65836718
diff -r c8680debe1cc -r 98a88a884610 src/menu.c
--- a/src/menu.c Mon Mar 20 21:55:45 2006 +0000
+++ b/src/menu.c Mon Mar 20 21:59:49 2006 +0000
@@ -739,6 +739,7 @@
739739 switch (1 << i)
740740 {
741741 case MENU_VISUAL_MODE:
742+ case MENU_SELECT_MODE:
742743 case MENU_OP_PENDING_MODE:
743744 case MENU_CMDLINE_MODE:
744745 c = Ctrl_C;
@@ -1464,8 +1465,14 @@
14641465 switch (*cmd++)
14651466 {
14661467 case 'v': /* vmenu, vunmenu, vnoremenu */
1468+ modes = MENU_VISUAL_MODE | MENU_SELECT_MODE;
1469+ break;
1470+ case 'x': /* xmenu, xunmenu, xnoremenu */
14671471 modes = MENU_VISUAL_MODE;
14681472 break;
1473+ case 's': /* smenu, sunmenu, snoremenu */
1474+ modes = MENU_SELECT_MODE;
1475+ break;
14691476 case 'o': /* omenu */
14701477 modes = MENU_OP_PENDING_MODE;
14711478 break;
@@ -1480,7 +1487,8 @@
14801487 break;
14811488 case 'a': /* amenu */
14821489 modes = MENU_INSERT_MODE | MENU_CMDLINE_MODE | MENU_NORMAL_MODE
1483- | MENU_VISUAL_MODE | MENU_OP_PENDING_MODE;
1490+ | MENU_VISUAL_MODE | MENU_SELECT_MODE
1491+ | MENU_OP_PENDING_MODE;
14841492 break;
14851493 case 'n':
14861494 if (*cmd != 'o') /* nmenu, not noremenu */
@@ -1494,7 +1502,7 @@
14941502 if (forceit) /* menu!! */
14951503 modes = MENU_INSERT_MODE | MENU_CMDLINE_MODE;
14961504 else /* menu */
1497- modes = MENU_NORMAL_MODE | MENU_VISUAL_MODE
1505+ modes = MENU_NORMAL_MODE | MENU_VISUAL_MODE | MENU_SELECT_MODE
14981506 | MENU_OP_PENDING_MODE;
14991507 }
15001508
@@ -1545,7 +1553,12 @@
15451553 idx = MENU_INDEX_CMDLINE;
15461554 #ifdef FEAT_VISUAL
15471555 else if (VIsual_active)
1548- idx = MENU_INDEX_VISUAL;
1556+ {
1557+ if (VIsual_select)
1558+ idx = MENU_INDEX_SELECT;
1559+ else
1560+ idx = MENU_INDEX_VISUAL;
1561+ }
15491562 #endif
15501563 else if (state == HITRETURN || state == ASKMORE)
15511564 idx = MENU_INDEX_CMDLINE;
@@ -1712,7 +1725,11 @@
17121725 {
17131726 #ifdef FEAT_VISUAL
17141727 if (VIsual_active)
1728+ {
1729+ if (VIsual_select)
1730+ return MENU_INDEX_SELECT;
17151731 return MENU_INDEX_VISUAL;
1732+ }
17161733 #endif
17171734 if (State & INSERT)
17181735 return MENU_INDEX_INSERT;
diff -r c8680debe1cc -r 98a88a884610 src/ui.c
--- a/src/ui.c Mon Mar 20 21:55:45 2006 +0000
+++ b/src/ui.c Mon Mar 20 21:59:49 2006 +0000
@@ -139,7 +139,7 @@
139139 #endif
140140
141141 #ifdef FEAT_PROFILE
142- if (do_profiling && wtime != 0)
142+ if (do_profiling == PROF_YES && wtime != 0)
143143 prof_inchar_enter();
144144 #endif
145145
@@ -199,7 +199,7 @@
199199 theend:
200200 #endif
201201 #ifdef FEAT_PROFILE
202- if (do_profiling && wtime != 0)
202+ if (do_profiling == PROF_YES && wtime != 0)
203203 prof_inchar_exit();
204204 #endif
205205 return retval;
@@ -473,7 +473,8 @@
473473 * selected area. There is no specific redraw command for this,
474474 * just redraw all windows on the current buffer. */
475475 if (cbd->owned
476- && get_real_state() == VISUAL
476+ && (get_real_state() == VISUAL
477+ || get_real_state() == SELECTMODE)
477478 && clip_isautosel()
478479 && hl_attr(HLF_V) != hl_attr(HLF_VNC))
479480 redraw_curbuf_later(INVERTED_ALL);
@@ -503,7 +504,8 @@
503504 * area. There is no specific redraw command for this, just redraw all
504505 * windows on the current buffer. */
505506 if (was_owned
506- && get_real_state() == VISUAL
507+ && (get_real_state() == VISUAL
508+ || get_real_state() == SELECTMODE)
507509 && clip_isautosel()
508510 && hl_attr(HLF_V) != hl_attr(HLF_VNC))
509511 {
Show on old repository browser