Skip to content

Commit afc384e

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 96b4e92 + 2e51d9a commit afc384e

Some content is hidden

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

107 files changed

+1519
-834
lines changed

Filelist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ SRC_DOS = \
451451
src/xxd/Make_mvc.mak \
452452
nsis/gvim.nsi \
453453
nsis/gvim_version.nsh \
454+
nsis/vimrc.ini \
454455
nsis/README.txt \
455456
uninstal.txt \
456457
src/VisVim/Commands.cpp \

nsis/gvim.nsi

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ SilentInstall normal
8383
# These are the pages we use
8484
Page license
8585
Page components
86+
Page custom SetCustom ValidateCustom ": _vimrc setting"
8687
Page directory "" "" CheckInstallDir
8788
Page instfiles
8889
UninstPage uninstConfirm
@@ -135,6 +136,10 @@ Function .onInit
135136
StrCpy $1 "-register-OLE"
136137
StrCpy $2 "gvim evim gview gvimdiff vimtutor"
137138

139+
# Extract InstallOptions files
140+
# $PLUGINSDIR will automatically be removed when the installer closes
141+
InitPluginsDir
142+
File /oname=$PLUGINSDIR\vimrc.ini "vimrc.ini"
138143
FunctionEnd
139144

140145
Function .onUserAbort
@@ -404,7 +409,7 @@ Section "Add an Edit-with-Vim context menu entry"
404409
SectionEnd
405410

406411
##########################################################
407-
Section "Create a _vimrc if it doesn't exist"
412+
Section "Create a _vimrc if it doesn't exist" sec_vimrc_id
408413
SectionIn 1 3
409414

410415
StrCpy $1 "$1 -create-vimrc"
@@ -462,6 +467,45 @@ Section -post
462467
BringToFront
463468
SectionEnd
464469

470+
##########################################################
471+
Function SetCustom
472+
# Display the InstallOptions dialog
473+
474+
# Check if a _vimrc should be created
475+
SectionGetFlags ${sec_vimrc_id} $0
476+
IntOp $0 $0 & 1
477+
StrCmp $0 "1" +2 0
478+
Abort
479+
480+
Push $3
481+
InstallOptions::dialog "$PLUGINSDIR\vimrc.ini"
482+
Pop $3
483+
Pop $3
484+
FunctionEnd
485+
486+
Function ValidateCustom
487+
ReadINIStr $3 "$PLUGINSDIR\vimrc.ini" "Field 2" "State"
488+
StrCmp $3 "1" 0 +3
489+
StrCpy $1 "$1 -vimrc-remap no"
490+
Goto behave
491+
492+
StrCpy $1 "$1 -vimrc-remap win"
493+
494+
behave:
495+
ReadINIStr $3 "$PLUGINSDIR\vimrc.ini" "Field 5" "State"
496+
StrCmp $3 "1" 0 +3
497+
StrCpy $1 "$1 -vimrc-behave unix"
498+
Goto done
499+
500+
ReadINIStr $3 "$PLUGINSDIR\vimrc.ini" "Field 6" "State"
501+
StrCmp $3 "1" 0 +3
502+
StrCpy $1 "$1 -vimrc-behave mswin"
503+
Goto done
504+
505+
StrCpy $1 "$1 -vimrc-behave default"
506+
done:
507+
FunctionEnd
508+
465509
##########################################################
466510
Section Uninstall
467511
# Apparently $INSTDIR is set to the directory where the uninstaller is

nsis/vimrc.ini

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
[Settings]
2+
NumFields=7
3+
4+
[Field 1]
5+
Type=GroupBox
6+
Left=0
7+
Right=-1
8+
Top=0
9+
Bottom=53
10+
Text=" Key remapping "
11+
12+
[Field 2]
13+
Type=radiobutton
14+
Text=Do not remap keys for Windows behavior (Default)
15+
Left=10
16+
Right=-10
17+
Top=17
18+
Bottom=25
19+
State=1
20+
Flags=GROUP
21+
22+
[Field 3]
23+
Type=radiobutton
24+
Text=Remap a few keys for Windows behavior (<C-V>, <C-C>, <C-A>, <C-S>, <C-F>, etc)
25+
Left=10
26+
Right=-10
27+
Top=30
28+
Bottom=47
29+
State=0
30+
Flags=NOTABSTOP
31+
32+
[Field 4]
33+
Type=GroupBox
34+
Left=0
35+
Right=-1
36+
Top=55
37+
Bottom=-5
38+
Text=" Mouse behavior "
39+
40+
[Field 5]
41+
Type=radiobutton
42+
Text=Right button extends selection, left button starts visual mode (Unix)
43+
Left=10
44+
Right=-5
45+
Top=72
46+
Bottom=80
47+
State=0
48+
Flags=GROUP
49+
50+
[Field 6]
51+
Type=radiobutton
52+
Text=Right button has a popup menu, left button starts select mode (Windows)
53+
Left=10
54+
Right=-5
55+
Top=85
56+
Bottom=93
57+
State=0
58+
Flags=NOTABSTOP
59+
60+
[Field 7]
61+
Type=radiobutton
62+
Text=Right button has a popup menu, left button starts visual mode (Default)
63+
Left=10
64+
Right=-5
65+
Top=98
66+
Bottom=106
67+
State=1
68+
Flags=NOTABSTOP

runtime/doc/eval.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8879,9 +8879,8 @@ listcmds Compiled with commands for the buffer list |:files|
88798879
and the argument list |arglist|.
88808880
localmap Compiled with local mappings and abbr. |:map-local|
88818881
lua Compiled with Lua interface |Lua|.
8882-
mac Any Macintosh version of Vim, but not all OS X.
8883-
macunix Compiled for OS X, with |mac-darwin-feature|
8884-
osx Compiled for OS X, with or w/o |mac-darwin-feature|
8882+
mac Any Macintosh version of Vim cf. osx
8883+
macunix Synonym for osxdarwin
88858884
menu Compiled with support for |:menu|.
88868885
mksession Compiled with support for |:mksession|.
88878886
modify_fname Compiled with file name modifiers. |filename-modifiers|
@@ -8905,6 +8904,8 @@ netbeans_intg Compiled with support for |netbeans|.
89058904
num64 Compiled with 64-bit |Number| support.
89068905
odbeditor Compiled with |odbeditor| support.
89078906
ole Compiled with OLE automation support for Win32.
8907+
osx Compiled for macOS cf. mac
8908+
osxdarwin Compiled for macOS, with |mac-darwin-feature|
89088909
packages Compiled with |packages| support.
89098910
path_extra Compiled with up/downwards search in 'path' and 'tags'
89108911
perl Compiled with Perl interface.

runtime/doc/options.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4571,7 +4571,17 @@ A jump table for the options with a short description can be found at |Q_op|.
45714571
match may not be found. This is to avoid that Vim hangs while you
45724572
are typing the pattern.
45734573
The highlighting can be set with the 'i' flag in 'highlight'.
4574-
See also: 'hlsearch'.
4574+
When 'hlsearch' is on, all matched strings are highlighted too while typing
4575+
a search command. See also: 'hlsearch'.
4576+
If you don't want turn 'hlsearch' on, but want to highlight all matches
4577+
while searching, you can turn on and off 'hlsearch' with autocmd.
4578+
Example: >
4579+
augroup vimrc-incsearch-highlight
4580+
autocmd!
4581+
autocmd CmdlineEnter [/\?] :set hlsearch
4582+
autocmd CmdlineLeave [/\?] :set nohlsearch
4583+
augroup END
4584+
<
45754585
CTRL-L can be used to add one character from after the current match
45764586
to the command line. If 'ignorecase' and 'smartcase' are set and the
45774587
command line has no uppercase characters, the added character is

runtime/doc/os_mac.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,9 @@ If you want to disable it, pass `--disable-darwin` to the configure script: >
168168
and then run `make` to build Vim. The order of the options doesn't matter.
169169

170170
To make sure at runtime whether or not the darwin feature is compiled in, you
171-
can use `has('macunix')` which returns 1 if the feature is compiled in; 0
172-
otherwise.
171+
can use `has('osxdarwin')` which returns 1 if the feature is compiled in; 0
172+
otherwise. For backwards comptibility, you can still use `macunix` instead of
173+
`osxdarwin`.
173174

174175
Notable use cases where `--disable-darwin` is turned out to be useful are:
175176

runtime/mswin.vim

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Set options and add mapping such that Vim behaves a lot like MS-Windows
22
"
33
" Maintainer: Bram Moolenaar <[email protected]>
4-
" Last change: 2017 Feb 09
4+
" Last change: 2017 Oct 28
55

66
" bail out if this isn't wanted (mrsvim.vim uses this).
77
if exists("g:skip_loading_mswin") && g:skip_loading_mswin
@@ -105,14 +105,15 @@ onoremap <C-F4> <C-C><C-W>c
105105
106106
if has("gui")
107107
" CTRL-F is the search dialog
108-
noremap <C-F> :promptfind<CR>
109-
inoremap <C-F> <C-\><C-O>:promptfind<CR>
110-
cnoremap <C-F> <C-\><C-C>:promptfind<CR>
111-
112-
" CTRL-H is the replace dialog
113-
noremap <C-H> :promptrepl<CR>
114-
inoremap <C-H> <C-\><C-O>:promptrepl<CR>
115-
cnoremap <C-H> <C-\><C-C>:promptrepl<CR>
108+
noremap <expr> <C-F> has("gui_running") ? ":promptfind\<CR>" : "/"
109+
inoremap <expr> <C-F> has("gui_running") ? "\<C-\>\<C-O>:promptfind\<CR>" : "\<C-\>\<C-O>/"
110+
cnoremap <expr> <C-F> has("gui_running") ? "\<C-\>\<C-C>:promptfind\<CR>" : "\<C-\>\<C-O>/"
111+
112+
" CTRL-H is the replace dialog,
113+
" but in console, it might be backspace, so don't map it there
114+
nnoremap <expr> <C-H> has("gui_running") ? ":promptrepl\<CR>" : "\<C-H>"
115+
inoremap <expr> <C-H> has("gui_running") ? "\<C-\>\<C-O>:promptrepl\<CR>" : "\<C-H>"
116+
cnoremap <expr> <C-H> has("gui_running") ? "\<C-\>\<C-C>:promptrepl\<CR>" : "\<C-H>"
116117
endif
117118

118119
" restore 'cpoptions'

src/Makefile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ CClink = $(CC)
340340
# When both GTK+ 2 and GTK+ 3 are possible then GTK+ 2 will be selected.
341341
# To use GTK+ 3 instead use --enable-gui=gtk3 (see below).
342342
#CONF_OPT_GUI = --disable-gtk2-check
343-
#CONF_OPT_GUI = --enable-gnome2-check
343+
#CONF_OPT_GUI = --enable-gnome-check
344344
#CONF_OPT_GUI = --disable-gtk3-check
345345
#CONF_OPT_GUI = --disable-motif-check
346346
#CONF_OPT_GUI = --disable-athena-check
@@ -483,9 +483,12 @@ CClink = $(CC)
483483
#CONF_OPT_CHANNEL = --disable-channel
484484

485485
# TERMINAL - Terminal emulator support, :terminal command. Requires the
486-
# channel feature.
487-
# Uncomment this when you want terminal emulator support.
486+
# channel feature. The default is enable for when using "huge" features.
487+
# Uncomment the first line when you want terminal emulator support for
488+
# not-huge builds. Uncomment the second line when you don't want terminal
489+
# emulator support in the huge build.
488490
#CONF_OPT_TERMINAL = --enable-terminal
491+
#CONF_OPT_TERMINAL = --disable-terminal
489492

490493
# MULTIBYTE - To edit multi-byte characters.
491494
# Uncomment this when you want to edit a multibyte language.
@@ -2117,13 +2120,12 @@ test1 \
21172120
test_listchars \
21182121
test_search_mbyte \
21192122
test_wordcount \
2120-
test3 test11 test12 test14 test15 test17 test19 \
2121-
test20 test25 test28 test29 \
2122-
test30 test32 test36 test37 test38 test39 \
2123+
test3 test11 test12 test14 test15 test17 \
2124+
test29 test30 test36 test37 test39 \
21232125
test40 test42 test44 test45 test48 test49 \
21242126
test50 test52 test55 test59 \
2125-
test64 test66 test68 test69 \
2126-
test70 test72 test73 test77 test79 \
2127+
test64 test68 test69 \
2128+
test70 test72 test73 test77 \
21272129
test83 test85 test86 test87 test88 \
21282130
test94 test95 test99 test108:
21292131
cd testdir; rm -f [email protected]; $(MAKE) -f Makefile [email protected] VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
@@ -2257,6 +2259,7 @@ test_arglist \
22572259
test_reltime \
22582260
test_retab \
22592261
test_ruby \
2262+
test_scroll_opt \
22602263
test_scrollbind \
22612264
test_search \
22622265
test_searchpos \

0 commit comments

Comments
 (0)