Skip to content

Commit 25be5f4

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents d6892b2 + 9dfa313 commit 25be5f4

101 files changed

Lines changed: 4782 additions & 2161 deletions

Some content is hidden

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

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ src/auto/pathdef.c
3333
*.suo
3434
*.res
3535
*.RES
36+
vim*.dll
37+
vim*.lib
3638
src/if_perl.c
3739
src/pathdef.c
3840
src/Obj*/pathdef.c
@@ -68,6 +70,7 @@ src/po/vim.pot
6870

6971
# Generated by "make test"
7072
src/po/*.ck
73+
src/po/*.desktop
7174
src/testdir/mbyte.vim
7275
src/testdir/mzscheme.vim
7376
src/testdir/lua.vim

Filelist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ SRC_DOS = \
454454
src/iscygpty.h \
455455
src/iid_ole.c \
456456
src/os_dos.h \
457+
src/os_w32dll.c \
457458
src/os_w32exe.c \
458459
src/os_win32.c \
459460
src/os_mswin.c \

nsis/gvim.nsi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,9 @@ Section "$(str_section_exe)" id_section_exe
322322

323323
SetOutPath $0
324324
File /oname=gvim.exe ${VIMSRC}\gvim_ole.exe
325+
!if /FileExists "${VIMSRC}\vim${BIT}.dll"
326+
File ${VIMSRC}\vim${BIT}.dll
327+
!endif
325328
File /oname=install.exe ${VIMSRC}\installw32.exe
326329
File /oname=uninstal.exe ${VIMSRC}\uninstalw32.exe
327330
File ${VIMSRC}\vimrun.exe

runtime/doc/eval.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2700,6 +2700,7 @@ test_override({expr}, {val}) none test with Vim internal overrides
27002700
test_refcount({expr}) Number get the reference count of {expr}
27012701
test_scrollbar({which}, {value}, {dragging})
27022702
none scroll in the GUI for testing
2703+
test_setmouse({row}, {col}) none set the mouse position for testing
27032704
test_settime({expr}) none set current time for testing
27042705
timer_info([{id}]) List information about timers
27052706
timer_pause({id}, {pause}) none pause or unpause a timer
@@ -9805,6 +9806,8 @@ test_override({name}, {val}) *test_override()*
98059806
starting reset the "starting" variable, see below
98069807
nfa_fail makes the NFA regexp engine fail to force a
98079808
fallback to the old engine
9809+
no_query_mouse do not query the mouse position for "dec"
9810+
terminals
98089811
ALL clear all overrides ({val} is not used)
98099812

98109813
"starting" is to be used when a test should behave like
@@ -9839,6 +9842,13 @@ test_scrollbar({which}, {value}, {dragging}) *test_scrollbar()*
98399842
Only works when the {which} scrollbar actually exists,
98409843
obviously only when using the GUI.
98419844

9845+
test_setmouse({row}, {col}) *test_setmouse()*
9846+
Set the mouse position to be used for the next mouse action.
9847+
{row} and {col} are one based.
9848+
For example: >
9849+
call test_setmouse(4, 20)
9850+
call feedkeys("\<LeftMouse>", "xt")
9851+
98429852
test_settime({expr}) *test_settime()*
98439853
Set the time Vim uses internally. Currently only used for
98449854
timestamps in the history, as they are used in viminfo, and
@@ -10524,6 +10534,7 @@ modify_fname Compiled with file name modifiers. |filename-modifiers|
1052410534
mouse Compiled with support mouse.
1052510535
mouse_dec Compiled with support for Dec terminal mouse.
1052610536
mouse_gpm Compiled with support for gpm (Linux console mouse)
10537+
mouse_gpm_enabled GPM mouse is working
1052710538
mouse_netterm Compiled with support for netterm mouse.
1052810539
mouse_pterm Compiled with support for qnx pterm mouse.
1052910540
mouse_sysmouse Compiled with support for sysmouse (*BSD console mouse)

runtime/doc/gui.txt

Lines changed: 152 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*gui.txt* For Vim version 8.1. Last change: 2019 Jan 06
1+
*gui.txt* For Vim version 8.1. Last change: 2019 Apr 28
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -11,8 +11,9 @@ Vim's Graphical User Interface *gui* *GUI*
1111
3. Mouse Control |gui-mouse|
1212
4. Making GUI Selections |gui-selections|
1313
5. Menus |menus|
14-
6. Extras |gui-extras|
15-
7. Shell Commands |gui-shell|
14+
6. Font |gui-font|
15+
7. Extras |gui-extras|
16+
8. Shell Commands |gui-shell|
1617

1718
Other GUI documentation:
1819
|gui_x11.txt| For specific items of the X11 GUI.
@@ -1039,7 +1040,153 @@ make a selection.
10391040
Note that a menu that starts with ']' will not be displayed.
10401041

10411042
==============================================================================
1042-
6. Extras *gui-extras*
1043+
6. Font
1044+
1045+
This section describes font related options.
1046+
1047+
GUIFONT *gui-font*
1048+
1049+
'guifont' is the option that tells Vim what font to use. In its simplest form
1050+
the value is just one font name. It can also be a list of font names
1051+
separated with commas. The first valid font is used. When no valid font can
1052+
be found you will get an error message.
1053+
1054+
On systems where 'guifontset' is supported (X11) and 'guifontset' is not
1055+
empty, then 'guifont' is not used. See |xfontset|.
1056+
1057+
Note: As to the GTK GUIs, no error is given against any invalid names, and the
1058+
first element of the list is always picked up and made use of. This is
1059+
because, instead of identifying a given name with a font, the GTK GUIs use it
1060+
to construct a pattern and try to look up a font which best matches the
1061+
pattern among available fonts, and this way, the matching never fails. An
1062+
invalid name doesn't matter because a number of font properties other than
1063+
name will do to get the matching done.
1064+
1065+
Spaces after a comma are ignored. To include a comma in a font name precede
1066+
it with a backslash. Setting an option requires an extra backslash before a
1067+
space and a backslash. See also |option-backslash|. For example: >
1068+
:set guifont=Screen15,\ 7x13,font\\,with\\,commas
1069+
will make Vim try to use the font "Screen15" first, and if it fails it will
1070+
try to use "7x13" and then "font,with,commas" instead.
1071+
1072+
If none of the fonts can be loaded, Vim will keep the current setting. If an
1073+
empty font list is given, Vim will try using other resource settings (for X,
1074+
it will use the Vim.font resource), and finally it will try some builtin
1075+
default which should always be there ("7x13" in the case of X). The font
1076+
names given should be "normal" fonts. Vim will try to find the related bold
1077+
and italic fonts.
1078+
1079+
For Win32, GTK, Motif, Mac OS and Photon: >
1080+
:set guifont=*
1081+
will bring up a font requester, where you can pick the font you want.
1082+
1083+
In MacVim ":set guifont=*" calls: >
1084+
:macaction orderFrontFontPanel:
1085+
which is the same as choosing "Show Fonts..." from the main menu.
1086+
1087+
The font name depends on the GUI used. See |setting-guifont| for a way to set
1088+
'guifont' for various systems.
1089+
1090+
For the GTK+ 2 and 3 GUIs, the font name looks like this: >
1091+
:set guifont=Andale\ Mono\ 11
1092+
That's all. XLFDs are not used. For Chinese this is reported to work well: >
1093+
if has("gui_gtk2")
1094+
set guifont=Bitstream\ Vera\ Sans\ Mono\ 12,Fixed\ 12
1095+
set guifontwide=Microsoft\ Yahei\ 12,WenQuanYi\ Zen\ Hei\ 12
1096+
endif
1097+
<
1098+
(Replace gui_gtk2 with gui_gtk3 for the GTK+ 3 GUI)
1099+
1100+
For Mac OSX you can use something like this: >
1101+
:set guifont=Monaco:h10
1102+
Also see 'macatsui', it can help fix display problems {not in MacVim}.
1103+
In MacVim, fonts with spaces are set like this: >
1104+
:set guifont=DejaVu\ Sans\ Mono:h13
1105+
<
1106+
*E236*
1107+
Note that the fonts must be mono-spaced (all characters have the same width).
1108+
An exception is MacVim and GTK: all fonts are accepted, but mono-spaced fonts
1109+
look best.
1110+
1111+
To preview a font on X11, you might be able to use the "xfontsel" program.
1112+
The "xlsfonts" program gives a list of all available fonts.
1113+
1114+
For the Win32 GUI *E244* *E245*
1115+
- Takes these options in the font name (use a ':' to separate the options):
1116+
hXX - height is XX (points, can be floating-point)
1117+
wXX - width is XX (points, can be floating-point)
1118+
WXX - weight is XX (see Note on Weights below)
1119+
b - bold. This is equivalent to setting the weight to 700.
1120+
i - italic
1121+
u - underline
1122+
s - strikeout
1123+
cXX - character set XX. Valid charsets are: ANSI, ARABIC, BALTIC,
1124+
CHINESEBIG5, DEFAULT, EASTEUROPE, GB2312, GREEK, HANGEUL,
1125+
HEBREW, JOHAB, MAC, OEM, RUSSIAN, SHIFTJIS, SYMBOL, THAI,
1126+
TURKISH, VIETNAMESE ANSI and BALTIC. Normally you would use
1127+
"cDEFAULT".
1128+
qXX - quality XX. Valid quality names are: PROOF, DRAFT, ANTIALIASED,
1129+
NONANTIALIASED, CLEARTYPE, DEFAULT. Normally you would use
1130+
"qDEFAULT".
1131+
Some quality values are not supported in legacy OSs.
1132+
- A '_' can be used in the place of a space, so you don't need to use
1133+
backslashes to escape the spaces.
1134+
Examples: >
1135+
:set guifont=courier_new:h12:w5:b:cRUSSIAN
1136+
:set guifont=Andale_Mono:h7.5:w4.5
1137+
1138+
See also |font-sizes|.
1139+
1140+
Note on Weights: Fonts often come with a variety of weights. "Normal" weights
1141+
in Windows have a value of 400 and, left unspecified, this is the value that
1142+
will be used when attempting to find fonts. Windows will often match fonts
1143+
based on their weight with higher priority than the font name which means a
1144+
Book or Medium variant of a font might be used despite specifying a Light or
1145+
ExtraLight variant. If you are experiencing heavier weight substitution, then
1146+
explicitly setting a lower weight value may mitigate against this unwanted
1147+
substitution.
1148+
1149+
1150+
GUIFONTWIDE *gui-fontwide*
1151+
1152+
When not empty, 'guifontwide' specifies a comma-separated list of fonts to be
1153+
used for double-width characters. The first font that can be loaded is
1154+
used.
1155+
1156+
Note: The size of these fonts must be exactly twice as wide as the one
1157+
specified with 'guifont' and the same height. If there is a mismatch then
1158+
the text will not be drawn correctly.
1159+
1160+
All GUI versions but MacVim and GTK+:
1161+
1162+
'guifontwide' is only used when 'encoding' is set to "utf-8" and
1163+
'guifontset' is empty or invalid.
1164+
When 'guifont' is set and a valid font is found in it and
1165+
'guifontwide' is empty Vim will attempt to find a matching
1166+
double-width font and set 'guifontwide' to it.
1167+
1168+
MacVim only: *guifontwide_macvim*
1169+
1170+
MacVim performs automatic font substitution. If 'guifontwide' is set, that
1171+
font will be used for all wide fonts. However, if a glyph is not available in
1172+
the wide font, then font substitution is still used.
1173+
1174+
GTK+ GUI only: *guifontwide_gtk*
1175+
1176+
If set and valid, 'guifontwide' is always used for double width
1177+
characters, even if 'encoding' is not set to "utf-8".
1178+
Vim does not attempt to find an appropriate value for 'guifontwide'
1179+
automatically. If 'guifontwide' is empty Pango/Xft will choose the
1180+
font for characters not available in 'guifont'. Thus you do not need
1181+
to set 'guifontwide' at all unless you want to override the choice
1182+
made by Pango/Xft.
1183+
1184+
Windows +multibyte only: *guifontwide_win_mbyte*
1185+
1186+
If set and valid, 'guifontwide' is used for IME instead of 'guifont'.
1187+
1188+
==============================================================================
1189+
7. Extras *gui-extras*
10431190

10441191
This section describes other features which are related to the GUI.
10451192

@@ -1085,7 +1232,7 @@ A recommended Japanese font is MS Mincho. You can find info here:
10851232
http://www.lexikan.com/mincho.htm
10861233

10871234
==============================================================================
1088-
7. Shell Commands *gui-shell*
1235+
8. Shell Commands *gui-shell*
10891236

10901237
For the X11 GUI the external commands are executed inside the gvim window.
10911238
See |gui-pty|.

runtime/doc/gui_w32.txt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*gui_w32.txt* For Vim version 8.1. Last change: 2017 Oct 27
1+
*gui_w32.txt* For Vim version 8.1. Last change: 2019 Apr 28
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -31,6 +31,17 @@ The GUI will always run in the Windows subsystem. Mostly shells automatically
3131
return with a command prompt after starting gvim. If not, you should use the
3232
"start" command: >
3333
start gvim [options] file ..
34+
< *E988*
35+
The console version with the |-g| option may also start the GUI by executing
36+
gvim.exe: >
37+
vim -g [options] file ..
38+
To make this work, gvim.exe must exist in the same directory as the vim.exe,
39+
and this feature must be enabled at compile time.
40+
41+
One may also use `:gui` from the console version. However, this is an
42+
experimental feature and this feature must be enabled at compile time.
43+
It uses a session file to recreate the current state of the console Vim in the
44+
GUI Vim.
3445

3546
Note: All fonts (bold, italic) must be of the same size!!! If you don't do
3647
this, text will disappear or mess up the display. Vim does not check the font

runtime/doc/index.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,11 +1188,13 @@ tag command action ~
11881188
|:cNfile| :cNf[ile] go to last error in previous file
11891189
|:cabbrev| :ca[bbrev] like ":abbreviate" but for Command-line mode
11901190
|:cabclear| :cabc[lear] clear all abbreviations for Command-line mode
1191+
|:cabove| :cabo[ve] go to error above current line
11911192
|:caddbuffer| :cad[dbuffer] add errors from buffer
11921193
|:caddexpr| :cadde[xpr] add errors from expr
11931194
|:caddfile| :caddf[ile] add error message to current quickfix list
11941195
|:call| :cal[l] call a function
11951196
|:catch| :cat[ch] part of a :try command
1197+
|:cbelow| :cbe[low] got to error below current line
11961198
|:cbottom| :cbo[ttom] scroll to the bottom of the quickfix window
11971199
|:cbuffer| :cb[uffer] parse error messages and jump to first error
11981200
|:cc| :cc go to specific error
@@ -1350,12 +1352,14 @@ tag command action ~
13501352
|:lNext| :lN[ext] go to previous entry in location list
13511353
|:lNfile| :lNf[ile] go to last entry in previous file
13521354
|:list| :l[ist] print lines
1355+
|:labove| :lab[ove] go to location above current line
13531356
|:laddexpr| :lad[dexpr] add locations from expr
13541357
|:laddbuffer| :laddb[uffer] add locations from buffer
13551358
|:laddfile| :laddf[ile] add locations to current location list
13561359
|:last| :la[st] go to the last file in the argument list
13571360
|:language| :lan[guage] set the language (locale)
13581361
|:later| :lat[er] go to newer change, redo
1362+
|:lbelow| :lbe[low] go to location below current line
13591363
|:lbottom| :lbo[ttom] scroll to the bottom of the location window
13601364
|:lbuffer| :lb[uffer] parse locations and jump to first location
13611365
|:lcd| :lc[d] change directory locally

runtime/doc/mbyte.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,21 @@ windows maintains a table of which groups of characters are required for a
620620
locale. You have to specify all the fonts that a locale requires in the
621621
'guifontset' option.
622622

623+
Setting the 'guifontset' option also means that all font names will be handled
624+
as a fontset name. Also the ones used for the "font" argument of the
625+
|:highlight| command.
626+
627+
Note the difference between 'guifont' and 'guifontset': In 'guifont'
628+
the comma-separated names are alternative names, one of which will be
629+
used. In 'guifontset' the whole string is one fontset name,
630+
including the commas. It is not possible to specify alternative
631+
fontset names.
632+
This example works on many X11 systems: >
633+
:set guifontset=-*-*-medium-r-normal--16-*-*-*-c-*-*-*
634+
<
635+
The fonts must match with the current locale. If fonts for the character sets
636+
that the current locale uses are not included, setting 'guifontset' will fail.
637+
623638
NOTE: The fontset always uses the current locale, even though 'encoding' may
624639
be set to use a different charset. In that situation you might want to use
625640
'guifont' and 'guifontwide' instead of 'guifontset'.

0 commit comments

Comments
 (0)