Skip to content

Commit e02ab36

Browse files
committed
Merge branch 'vim'
2 parents ce999c0 + 28c3203 commit e02ab36

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1763
-548
lines changed

.hgignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ src/Obj*/pathdef.c
3838
gvimext.dll
3939
gvimext.lib
4040

41+
# Mac OSX
42+
src/xxd/xxd.dSYM
43+
4144
# All platforms
4245
*.rej
4346
*.orig

.hgtags

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2570,3 +2570,21 @@ f5c822e5a0eba6f490d0be9f6892de929295be87 v7-3-1230
25702570
537bbfff0c5c0bc2307a85133f59f07b00c55e41 v7-3-1231
25712571
a594ce86b5eade96cb84415b3b027abe611c2238 v7-3-1232
25722572
4ed713442c51625160cd0bca612d9a3417e4ba14 v7-3-1233
2573+
f4969f8f66e974584e8e7815d0a262c5dca79638 v7-3-1234
2574+
9ae0fe46777674504e0f372e68cfb8e0be81b2ee v7-3-1235
2575+
39980afcf54aafdb9255424adf5808af45ab2242 v7-3-1236
2576+
5b2c8f3b390632e1e57a3839f040146f6798a969 v7-3-1237
2577+
048c69ebe8eecb218320030d9ea41fe4f6290848 v7-3-1238
2578+
e130cc3d17af412971143b8420d6e7b1cbd13ff2 v7-3-1239
2579+
bc9125136c69a4feecb4b68912fa04380f42b77f v7-3-1240
2580+
c8747604696795a300f6ff05091813d691f9a488 v7-3-1241
2581+
b4a2eaf28b51327b4e56b4eacf4b5d72a52560f6 v7-3-1242
2582+
8a7d3a73adabaad5e9fe079acf6431982145c7d1 v7-3-1243
2583+
b4a71dbdb78790ca423103ad5deb71b1df9b5b04 v7-3-1244
2584+
43329b2b5b79ed2e1017869ee2e0b1caeaf2f0f6 v7-3-1245
2585+
a1b41dabc682ed8f8770a12c2d3a227eb348885b v7-3-1246
2586+
f451d60ab8ec56d02a7b5f2d5c16187566279886 v7-3-1247
2587+
3717d569027d8ec8b62e42e33f91333ac22ce6ba v7-3-1248
2588+
b614332f7df2f6f471bb4bd93767becd7844b90c v7-3-1249
2589+
6aecf486bb347ac6885afe36d62ddbbf2457f898 v7-3-1250
2590+
788f4802967766b7f3d6dce83cc027baef422f4a v7-3-1251

Filelist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ SRC_ALL = \
8787
src/testdir/python2/*.py \
8888
src/testdir/python3/*.py \
8989
src/testdir/pythonx/*.py \
90+
src/testdir/pythonx/topmodule/__init__.py \
91+
src/testdir/pythonx/topmodule/submodule/__init__.py \
92+
src/testdir/pythonx/topmodule/submodule/subsubmodule/__init__.py \
93+
src/testdir/pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py \
9094
src/testdir/python_after/*.py \
9195
src/testdir/python_before/*.py \
9296
src/proto.h \

runtime/autoload/tohtml.vim

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
" Vim autoload file for the tohtml plugin.
22
" Maintainer: Ben Fritz <[email protected]>
3-
" Last Change: 2013 May 31
3+
" Last Change: 2013 Jun 19
44
"
55
" Additional contributors:
66
"
@@ -401,15 +401,15 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
401401
call add(html, '</head>')
402402
let body_line_num = len(html)
403403
if !empty(s:settings.prevent_copy)
404-
call add(html, "<body onload='FixCharWidth(); JumpToLine();'>")
404+
call add(html, "<body onload='FixCharWidth();".(s:settings.line_ids ? " JumpToLine();" : "")."'>")
405405
call add(html, "<!-- hidden divs used by javascript to get the width of a char -->")
406406
call add(html, "<div id='oneCharWidth'>0</div>")
407407
call add(html, "<div id='oneInputWidth'><input size='1' value='0'".tag_close."</div>")
408408
call add(html, "<div id='oneEmWidth' style='width: 1em;'></div>")
409409
else
410-
call add(html, '<body onload="JumpToLine();">')
410+
call add(html, '<body'.(s:settings.line_ids ? ' onload="JumpToLine();"' : '').'>')
411411
endif
412-
call add(html, "<table border='1' width='100%' id='vimCodeElement'>")
412+
call add(html, "<table border='1' width='100%' id='vimCodeElement".s:settings.id_suffix."'>")
413413

414414
call add(html, '<tr>')
415415
for buf in a:win_list
@@ -475,7 +475,7 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
475475
let temp = getline(1,'$')
476476
" clean out id on the main content container because we already set it on
477477
" the table
478-
let temp[0] = substitute(temp[0], " id='vimCodeElement'", "", "")
478+
let temp[0] = substitute(temp[0], " id='vimCodeElement[^']*'", "", "")
479479
" undo deletion of start and end part
480480
" so we can later save the file as valid html
481481
" TODO: restore using grabbed lines if undolevel is 1?
@@ -568,9 +568,9 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
568568
\ ' var emWidth = document.getElementById("oneEmWidth").clientWidth;',
569569
\ ' if (inputWidth > goodWidth) {',
570570
\ ' while (ratio < 100*goodWidth/emWidth && ratio < 100) {',
571-
\ ' ratio += 5;',
572-
\ ' }',
573-
\ ' document.getElementById("vimCodeElement").className = "em"+ratio;',
571+
\ ' ratio += 5;',
572+
\ ' }',
573+
\ ' document.getElementById("vimCodeElement'.s:settings.id_suffix.'").className = "em"+ratio;',
574574
\ ' }',
575575
\ '}'
576576
\ ])
@@ -596,7 +596,7 @@ func! tohtml#Diff2HTML(win_list, buf_list) "{{{
596596
\ "",
597597
\ " /* navigate upwards in the DOM tree to open all folds containing the line */",
598598
\ " var node = lineElem;",
599-
\ " while (node && node.id != 'vimCodeElement')",
599+
\ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
600600
\ " {",
601601
\ " if (node.className == 'closed-fold')",
602602
\ " {",
@@ -722,6 +722,7 @@ func! tohtml#GetUserSettings() "{{{
722722
call tohtml#GetOption(user_settings, 'no_invalid', 0 )
723723
call tohtml#GetOption(user_settings, 'whole_filler', 0 )
724724
call tohtml#GetOption(user_settings, 'use_xhtml', 0 )
725+
call tohtml#GetOption(user_settings, 'line_ids', user_settings.number_lines )
725726
" }}}
726727

727728
" override those settings that need it {{{
@@ -855,6 +856,20 @@ func! tohtml#GetUserSettings() "{{{
855856
let user_settings.no_invalid = 0
856857
endif
857858

859+
if exists('g:html_id_expr')
860+
let user_settings.id_suffix = eval(g:html_id_expr)
861+
if user_settings.id_suffix !~ '^[-_:.A-Za-z0-9]*$'
862+
echohl WarningMsg
863+
echomsg '2html: g:html_id_expr evaluated to invalid string for HTML id attributes'
864+
echomsg '2html: Omitting user-specified suffix'
865+
echohl None
866+
sleep 3
867+
let user_settings.id_suffix=""
868+
endif
869+
else
870+
let user_settings.id_suffix=""
871+
endif
872+
858873
" TODO: font
859874

860875
return user_settings

runtime/doc/index.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*index.txt* For Vim version 7.3. Last change: 2013 Jun 06
1+
*index.txt* For Vim version 7.3. Last change: 2013 Jun 21
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -801,6 +801,10 @@ tag char note action in Normal mode ~
801801
|zE| zE eliminate all folds
802802
|zF| zF create a fold for N lines
803803
|zG| zG mark word as good spelled word
804+
|zH| zH when 'wrap' off scroll half a screenwidth
805+
to the right
806+
|zL| zL when 'wrap' off scroll half a screenwidth
807+
to the left
804808
|zM| zM set 'foldlevel' to zero
805809
|zN| zN set 'foldenable'
806810
|zO| zO open folds recursively

runtime/doc/intro.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*intro.txt* For Vim version 7.3. Last change: 2012 Sep 05
1+
*intro.txt* For Vim version 7.3. Last change: 2013 Jun 17
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -261,6 +261,7 @@ Vim would never have become what it is now, without the help of these people!
261261
I wish to thank all the people that sent me bug reports and suggestions. The
262262
list is too long to mention them all here. Vim would not be the same without
263263
the ideas from all these people: They keep Vim alive!
264+
*love* *peace* *friendship* *gross-national-happiness*
264265

265266

266267
In this documentation there are several references to other versions of Vi:

runtime/doc/options.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4094,6 +4094,26 @@ A jump table for the options with a short description can be found at |Q_op|.
40944094
Can be overruled by using "\c" or "\C" in the pattern, see
40954095
|/ignorecase|.
40964096

4097+
*'imactivatefunc'* *'imaf'*
4098+
'imactivatefunc' 'imaf' string (default "")
4099+
global
4100+
{not in Vi}
4101+
{only available when compiled with |+xim| and
4102+
|+GUI_GTK|}
4103+
This option specifies a function that will be called to
4104+
activate/inactivate Input Method.
4105+
4106+
Example: >
4107+
function ImActivateFunc(active)
4108+
if a:active
4109+
... do something
4110+
else
4111+
... do something
4112+
endif
4113+
" return value is not used
4114+
endfunction
4115+
set imactivatefunc=ImActivateFunc
4116+
<
40974117
*'imactivatekey'* *'imak'*
40984118
'imactivatekey' 'imak' string (default "")
40994119
global
@@ -4191,6 +4211,24 @@ A jump table for the options with a short description can be found at |Q_op|.
41914211
The value 0 may not work correctly with Athena and Motif with some XIM
41924212
methods. Use 'imdisable' to disable XIM then.
41934213

4214+
*'imstatusfunc'* *'imsf'*
4215+
'imstatusfunc' 'imsf' string (default "")
4216+
global
4217+
{not in Vi}
4218+
{only available when compiled with |+xim| and
4219+
|+GUI_GTK|}
4220+
This option specifies a function that is called to obtain the status
4221+
of Input Method. It must return a positive number when IME is active.
4222+
4223+
Example: >
4224+
function ImStatusFunc()
4225+
let is_active = ...do something
4226+
return is_active ? 1 : 0
4227+
endfunction
4228+
set imstatusfunc=ImStatusFunc
4229+
<
4230+
NOTE: This function is invoked very often. Keep it fast.
4231+
41944232
*'include'* *'inc'*
41954233
'include' 'inc' string (default "^\s*#\s*include")
41964234
global or local to buffer |global-local|

0 commit comments

Comments
 (0)