Skip to content

Commit

Permalink
Merge branch 'vim'
Browse files Browse the repository at this point in the history
Conflicts:
	src/ex_getln.c
	src/option.c
	src/vim.h
  • Loading branch information
b4winckler committed Sep 1, 2012
2 parents 1c99b7c + e86d19e commit 933cfa5
Show file tree
Hide file tree
Showing 106 changed files with 3,395 additions and 765 deletions.
42 changes: 42 additions & 0 deletions .hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -1941,3 +1941,45 @@ c1780b4cb9955fc113c3c993c18c139e06425ef5 v7-3-601
5cacdf56c94b6fa1992f7e9c07c95bfe52bcccec v7-3-602
085f14642fe828b1cbae5706ca87f2932cebeb75 v7-3-603
acd91c9741a6d0185b7c63db412888de4f904118 v7-3-604
4873d9c4ad3b7214d3ea8af9712a87ff69948380 v7-3-605
c612d154bcdd642e4097ae88526a81ed7868c184 v7-3-606
002f2c5de317aaedb93bd2e506a295efe2d552ce v7-3-607
d47e6222d1cde1caf08fa63104375f5750c25d90 v7-3-608
d29aa05b7e311bc05491521f4059ca2b625c5550 v7-3-609
9f48a54329975434d73ddfc19e33c343653d5c73 v7-3-610
e13f2f3568e1e21fbd223a1c0627605e2b670c53 v7-3-611
2b4b6185054ff05fb6ee3ab1bcde47409bf2ebe0 v7-3-612
c03b6363492b26c02b4f8a725a91849a1a5cf548 v7-3-613
2bb51730ef4bb0824658f7507edad165e194dd45 v7-3-614
169ccc471a8a947c046b7ff41023b9045beb3496 v7-3-615
baba6286c91e63dd42039206e3e0990fb0ac346f v7-3-616
73db39ca1877a07008310a2ec98a2220e50c52f1 v7-3-617
0b1cb3f839c48daaccbb3abcbd5f1c394c57cb10 v7-3-618
27ecf0c87bd20140d9e85d4fd581332e0916191e v7-3-619
a6ebae140d89f35876628cde44f0e7ee5a0ae1d2 v7-3-620
ac13ea2b098d98e62408ec2d88026f690f68f940 v7-3-621
52247eb615118965bb6a949307e9abfd378cd088 v7-3-622
a46a101bfddd4fcf30759f3847fa1e18546907f4 v7-3-623
06749e351b1c030acf50cf8c469f8973aff4a96a v7-3-624
f43ffd820a46bf47b3e55b56d3e5334302383757 v7-3-625
956b1ed19282518e0287891d4e7b2b8a3f850402 v7-3-626
dc65e6429d2c1b79719455d7303f3f95c5897965 v7-3-627
1ed93878d6e224d46a7c125a82e52338b9bf0f6b v7-3-628
7de7ef01288db1abc944293a28aac13ddd87879e v7-3-629
3416ac23d0758528919aaffbe02cecc6420b8aac v7-3-630
99f076ca8d846d553aefd7e626ca938bcf93f259 v7-3-631
44038a9777aaf0e6502e0eb57b8f7ccf31798ec4 v7-3-632
ad5fbf3596e0a8ad15c260c5b529efc5ac689e13 v7-3-633
b7eea24095073d55ac3c59664466b78a0525bebc v7-3-634
f7f68f83fc335379bc9e3371c5118b8f81c8d5bc v7-3-635
616bc1ad4f12be0ef37fe67d2f6ed7535f20e515 v7-3-636
3b62d8f36cdf709d4e0575d63486ebe57ce7150c v7-3-637
c0256c4bd91ed7b806aab002e4a45e440dd00343 v7-3-638
1ec385a8faf4002fa300caf370ef2ac380d9702a v7-3-639
c2c3577021ed4e354853d330e5fc60691d8750c5 v7-3-640
c068389057c9a89fa351678b5f5776278971dabe v7-3-641
79ac6744237ce5076a6d2e2b21198dfddc2cc9dd v7-3-642
fdac34e3afa5f0dea26dba5e96932e3b9a0be50a v7-3-643
fb7c028dcac7555fee78096813e3846d157cc91b v7-3-644
1810ee914648ef3e16a8cf866299a32c4a9a00cb v7-3-645
e70485d3f81df4d72cb40d6fa4ad4218cf1e8392 v7-3-646
6 changes: 6 additions & 0 deletions Filelist
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,12 @@ SRC_DOS_BIN = \
src/vim*.ico \
src/vim.tlb \
src/vimtbar.lib \
src/xpm/COPYRIGHT \
src/xpm/README.txt \
src/xpm/include/*.h \
src/xpm/x64/lib/libXpm.lib \
src/xpm/x86/lib/libXpm.a \
src/xpm/x86/lib/libXpm.lib \
src/vimtbar.dll \
nsis/icons/*.bmp \
nsis/icons/*.ico \
Expand Down
127 changes: 113 additions & 14 deletions runtime/autoload/tohtml.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
" Vim autoload file for the tohtml plugin.
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
" Last Change: 2011 Apr 05
" Last Change: 2012 Jun 30
"
" Additional contributors:
"
Expand All @@ -11,7 +11,7 @@

" this file uses line continuations
let s:cpo_sav = &cpo
set cpo-=C
set cpo&vim

" Automatically find charsets from all encodings supported natively by Vim. With
" the 8bit- and 2byte- prefixes, Vim can actually support more encodings than
Expand Down Expand Up @@ -391,12 +391,25 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
call add(html, '<meta name="plugin-version" content="'.g:loaded_2html_plugin.'"'.tag_close)
call add(html, '<meta name="settings" content="'.
\ join(filter(keys(s:settings),'s:settings[v:val]'),',').
\ ',prevent_copy='.s:settings.prevent_copy.
\ '"'.tag_close)
call add(html, '<meta name="colorscheme" content="'.
\ (exists('g:colors_name')
\ ? g:colors_name
\ : 'none'). '"'.tag_close)

call add(html, '</head>')
let body_line_num = len(html)
call add(html, '<body>')
call add(html, '<table border="1" width="100%">')
if !empty(s:settings.prevent_copy)
call add(html, "<body onload='FixCharWidth();'>")
call add(html, "<!-- hidden divs used by javascript to get the width of a char -->")
call add(html, "<div id='oneCharWidth'>0</div>")
call add(html, "<div id='oneInputWidth'><input size='1' value='0'".tag_close."</div>")
call add(html, "<div id='oneEmWidth' style='width: 1em;'></div>")
else
call add(html, '<body>')
endif
call add(html, "<table border='1' width='100%' id='vimCodeElement'>")

call add(html, '<tr>')
for buf in a:win_list
Expand Down Expand Up @@ -454,16 +467,19 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
let insert_index = diff_style_start
endif

" Delete those parts that are not needed so
" we can include the rest into the resulting table
1,/^<body/d_
" Delete those parts that are not needed so we can include the rest into the
" resulting table.
1,/^<body.*\%(\n<!--.*-->\_s\+.*id='oneCharWidth'.*\_s\+.*id='oneInputWidth'.*\_s\+.*id='oneEmWidth'\)\?\zs/d_
$
?</body>?,$d_
let temp = getline(1,'$')
" clean out id on the main content container because we already set it on
" the table
let temp[0] = substitute(temp[0], " id='vimCodeElement'", "", "")
" undo deletion of start and end part
" so we can later save the file as valid html
" TODO: restore using grabbed lines if undolevel is 1?
normal 2u
normal! 2u
if s:settings.use_css
call add(html, '<td valign="top"><div>')
elseif s:settings.use_xhtml
Expand Down Expand Up @@ -520,12 +536,47 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
1
let style_start = search('^</head>')-1

" add required javascript in reverse order so we can just call append again
" and again without adjusting {{{

" insert script closing tag if any javascript is needed
if s:settings.dynamic_folds || !empty(s:settings.prevent_copy)
call append(style_start, [
\ '',
\ s:settings.use_xhtml ? '//]]>' : '-->',
\ "</script>"
\ ])
endif

" insert script which corrects the size of small input elements in
" prevent_copy mode. See 2html.vim for details on why this is needed and how
" it works.
if !empty(s:settings.prevent_copy)
call append(style_start, [
\ '',
\ '/* simulate a "ch" unit by asking the browser how big a zero character is */',
\ 'function FixCharWidth() {',
\ ' /* get the hidden element which gives the width of a single character */',
\ ' var goodWidth = document.getElementById("oneCharWidth").clientWidth;',
\ ' /* get all input elements, we''ll filter on class later */',
\ ' var inputTags = document.getElementsByTagName("input");',
\ ' var ratio = 5;',
\ ' var inputWidth = document.getElementById("oneInputWidth").clientWidth;',
\ ' var emWidth = document.getElementById("oneEmWidth").clientWidth;',
\ ' if (inputWidth > goodWidth) {',
\ ' while (ratio < 100*goodWidth/emWidth && ratio < 100) {',
\ ' ratio += 5;',
\ ' }',
\ ' document.getElementById("vimCodeElement").className = "em"+ratio;',
\ ' }',
\ '}'
\ ])
endif

" Insert javascript to toggle matching folds open and closed in all windows,
" if dynamic folding is active. {{{
" if dynamic folding is active.
if s:settings.dynamic_folds
call append(style_start, [
\ "<script type='text/javascript'>",
\ s:settings.use_xhtml ? '//<![CDATA[' : " <!--",
\ " function toggleFold(objID)",
\ " {",
\ " for (win_num = 1; win_num <= ".len(a:buf_list)."; win_num++)",
Expand All @@ -542,9 +593,14 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
\ " }",
\ " }",
\ " }",
\ s:settings.use_xhtml ? '//]]>' : " -->",
\ "</script>"
\ ])
endif

" insert script tag if any javascript is needed
if s:settings.dynamic_folds || s:settings.prevent_copy != ""
call append(style_start, [
\ "<script type='text/javascript'>",
\ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
endif "}}}

" Insert styles from all the generated html documents and additional styles
Expand Down Expand Up @@ -609,9 +665,10 @@ func! tohtml#GetUserSettings() "{{{
call tohtml#GetOption(user_settings, 'ignore_conceal', 0 )
call tohtml#GetOption(user_settings, 'ignore_folding', 0 )
call tohtml#GetOption(user_settings, 'dynamic_folds', 0 )
call tohtml#GetOption(user_settings, 'no_foldcolumn', 0 )
call tohtml#GetOption(user_settings, 'no_foldcolumn', user_settings.ignore_folding)
call tohtml#GetOption(user_settings, 'hover_unfold', 0 )
call tohtml#GetOption(user_settings, 'no_pre', 0 )
call tohtml#GetOption(user_settings, 'no_invalid', 0 )
call tohtml#GetOption(user_settings, 'whole_filler', 0 )
call tohtml#GetOption(user_settings, 'use_xhtml', 0 )
" }}}
Expand All @@ -637,6 +694,8 @@ func! tohtml#GetUserSettings() "{{{
" dynamic folding implies css
if user_settings.dynamic_folds
let user_settings.use_css = 1
else
let user_settings.no_foldcolumn = 1 " won't do anything but for consistency and for the test suite
endif

" if we're not using CSS we cannot use a pre section because <font> tags
Expand All @@ -663,6 +722,7 @@ func! tohtml#GetUserSettings() "{{{
endif
" }}}

" textual options
if exists("g:html_use_encoding") "{{{
" user specified the desired MIME charset, figure out proper
" 'fileencoding' from it or warn the user if we cannot
Expand Down Expand Up @@ -705,6 +765,45 @@ func! tohtml#GetUserSettings() "{{{
endif
endif "}}}

" Default to making nothing uncopyable, because we default to
" not-standards way of doing things, and also because Microsoft Word and
" others paste the <input> elements anyway.
"
" html_prevent_copy only has an effect when using CSS.
"
" All options:
" f - fold column
" n - line numbers (also within fold text)
" t - fold text
" d - diff filler
" c - concealed text (reserved future)
" l - listchars (reserved possible future)
" s - signs (reserved possible future)
"
" Normal text is always selectable.
let user_settings.prevent_copy = ""
if user_settings.use_css
if exists("g:html_prevent_copy")
if user_settings.dynamic_folds && !user_settings.no_foldcolumn && g:html_prevent_copy =~# 'f'
let user_settings.prevent_copy .= 'f'
endif
if user_settings.number_lines && g:html_prevent_copy =~# 'n'
let user_settings.prevent_copy .= 'n'
endif
if &diff && g:html_prevent_copy =~# 'd'
let user_settings.prevent_copy .= 'd'
endif
if !user_settings.ignore_folding && g:html_prevent_copy =~# 't'
let user_settings.prevent_copy .= 't'
endif
else
let user_settings.prevent_copy = ""
endif
endif
if empty(user_settings.prevent_copy)
let user_settings.no_invalid = 0
endif

" TODO: font

return user_settings
Expand Down
10 changes: 8 additions & 2 deletions runtime/compiler/mcs.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
" Vim compiler file
" Compiler: Mono C# Compiler
" Maintainer: Jarek Sobiecki <harijari@go2.pl>
" Latest Revision: 2006-06-18
" Last Updated By: Peter Collingbourne
" Latest Revision: 2012 Jul 19

if exists("current_compiler")
finish
Expand All @@ -12,13 +13,18 @@ let s:cpo_save = &cpo
set cpo-=C

setlocal errorformat=
\%D%.%#Project\ \"%f/%[%^/\"]%#\"%.%#,
\%X%.%#Done\ building\ project\ \"%f/%[%^/\"]%#\"%.%#,
\%-G%\\s%.%#,
\%E%f(%l):\ error\ CS%n:%m,
\%W%f(%l):\ warning\ CS%n:%m,
\%E%f(%l\\,%c):\ error\ CS%n:%m,
\%W%f(%l\\,%c):\ warning\ CS%n:%m,
\%E%>syntax\ error\\,%m,%Z%f(%l\\,%c):\ error\ CS%n:%m,
\%D%*\\a[%*\\d]:\ Entering\ directory\ `%f',
\%X%*\\a[%*\\d]:\ Leaving\ directory\ `%f',
\%DMaking\ %*\\a\ in\ %f,
\%G-%.%#
\%-G%.%#

let &cpo = s:cpo_save
unlet s:cpo_save
4 changes: 3 additions & 1 deletion runtime/doc/change.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*change.txt* For Vim version 7.3. Last change: 2012 Jun 13
*change.txt* For Vim version 7.3. Last change: 2012 Aug 08


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -666,6 +666,8 @@ The flags that you can use for the substitute commands:
[n] Report the number of matches, do not actually substitute. The [c]
flag is ignored. The matches are reported as if 'report' is zero.
Useful to |count-items|.
If \= |sub-replace-expression| is used, the expression will be
evaluated in the |sandbox| at every match.

[p] Print the line containing the last substitute.

Expand Down
4 changes: 2 additions & 2 deletions runtime/doc/diff.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*diff.txt* For Vim version 7.3. Last change: 2012 May 18
*diff.txt* For Vim version 7.3. Last change: 2012 Aug 08


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -333,7 +333,7 @@ diff. This example explains the format that Vim expects: >
The "1a2" item appends the line "bbb".
The "4d4" item deletes the line "111".
The '7c7" item replaces the line "GGG" with "ggg".
The "7c7" item replaces the line "GGG" with "ggg".

When 'diffexpr' is not empty, Vim evaluates it to obtain a diff file in the
format mentioned. These variables are set to the file names used:
Expand Down
4 changes: 2 additions & 2 deletions runtime/doc/editing.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*editing.txt* For Vim version 7.3. Last change: 2012 Jul 10
*editing.txt* For Vim version 7.3. Last change: 2012 Aug 08


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -393,7 +393,7 @@ is to use "path\[[]abc]". Then the file "path[abc]" literally.
*starstar-wildcard*
Expanding "**" is possible on Unix, Win32, Mac OS/X and a few other systems.
This allows searching a directory tree. This goes up to 100 directories deep.
Note there are some commands where this works slightly different, see
Note there are some commands where this works slightly differently, see
|file-searching|.
Example: >
:n **/*.txt
Expand Down
6 changes: 4 additions & 2 deletions runtime/doc/eval.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*eval.txt* For Vim version 7.3. Last change: 2012 Jul 10
*eval.txt* For Vim version 7.3. Last change: 2012 Aug 02


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -3288,8 +3288,9 @@ getfperm({fname}) *getfperm()*
"rwx" flags represent, in turn, the permissions of the owner
of the file, the group the file belongs to, and other users.
If a user does not have a given permission the flag for this
is replaced with the string "-". Example: >
is replaced with the string "-". Examples: >
:echo getfperm("/etc/passwd")
:echo getfperm(expand("~/.vimrc"))
< This will hopefully (from a security point of view) display
the string "rw-r--r--" or even "rw-------".

Expand Down Expand Up @@ -6327,6 +6328,7 @@ mouse_gpm Compiled with support for gpm (Linux console mouse)
mouse_netterm Compiled with support for netterm mouse.
mouse_pterm Compiled with support for qnx pterm mouse.
mouse_sysmouse Compiled with support for sysmouse (*BSD console mouse)
mouse_sgr Compiled with support for sgr mouse.
mouse_urxvt Compiled with support for urxvt mouse.
mouse_xterm Compiled with support for xterm mouse.
mouseshape Compiled with support for 'mouseshape'.
Expand Down
14 changes: 13 additions & 1 deletion runtime/doc/gui_w32.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*gui_w32.txt* For Vim version 7.3. Last change: 2011 Jul 23
*gui_w32.txt* For Vim version 7.3. Last change: 2012 Aug 04


VIM REFERENCE MANUAL by Bram Moolenaar
Expand Down Expand Up @@ -489,4 +489,16 @@ to:
And add gvim to the list of applications. This problem only appears to happen
with the Intellimouse driver 2.2 and when "Universal Scrolling" is turned on.


XPM support *w32-xpm-support*

Gvim can be build on MS-Windows with support for XPM files. |+xpm_w32|
See the Make_mvc.mak file for instructions, search for XPM.

To try out if XPM support works do this: >
:help
:exe 'sign define vimxpm icon=' . $VIMRUNTIME . '\\vim16x16.xpm'
:exe 'sign place 1 line=1 name=vimxpm file=' . expand('%:p')
<

vim:tw=78:sw=4:ts=8:ft=help:norl:
Loading

0 comments on commit 933cfa5

Please sign in to comment.