Skip to content

Commit 351faf9

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 7956ed5 + a8a60d0 commit 351faf9

41 files changed

Lines changed: 1405 additions & 282 deletions

Some content is hidden

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

Filelist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,8 @@ SRC_DOS = \
412412
src/msvc2008.bat \
413413
src/msvc2010.bat \
414414
src/msvc2015.bat \
415+
src/msys32.bat \
416+
src/msys64.bat \
415417
src/dimm.idl \
416418
src/dlldata.c \
417419
src/dosinst.c \

runtime/doc/if_lua.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Vim evaluation and command execution, and others.
127127
rules. Example: >
128128
:lua t = {math.pi, false, say = 'hi'}
129129
:echo luaeval('vim.list(t)')
130-
:" [3.141593, 0], 'say' is ignored
130+
:" [3.141593, v:false], 'say' is ignored
131131
<
132132
vim.dict([arg]) Returns an empty dictionary or, if "arg" is a
133133
Lua table, returns a dict d such that d[k] =
@@ -141,8 +141,7 @@ Vim evaluation and command execution, and others.
141141
:" {'say': 'hi'}, numeric keys ignored
142142
<
143143
vim.funcref({name}) Returns a Funcref to function {name} (see
144-
|Funcref|). It is equivalent to Vim's
145-
"function". NOT IMPLEMENTED YET
144+
|Funcref|). It is equivalent to Vim's function().
146145

147146
vim.buffer([arg]) If "arg" is a number, returns buffer with
148147
number "arg" in the buffer list or, if "arg"
@@ -166,7 +165,7 @@ Vim evaluation and command execution, and others.
166165
or window, respectively. Examples: >
167166
:lua l = vim.list()
168167
:lua print(type(l), vim.type(l))
169-
:" userdata list
168+
:" list
170169
<
171170
vim.command({cmd}) Executes the vim (ex-mode) command {cmd}.
172171
Examples: >

src/INSTALLpc.txt

Lines changed: 113 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,24 @@ any faster, but you can edit files larger than 2 Gbyte.
2222

2323
Contents:
2424
1. Microsoft Visual C++
25-
2. Using MinGW
26-
3. Cygwin
27-
4. Borland
28-
5. Cross compiling for Win32 from a Linux machine
29-
6. Building with Python support
30-
7. Building with Python3 support
31-
8. Building with Racket or MzScheme support
32-
9. Building with Lua support
33-
10. Building with Perl support
34-
11. Building with Ruby support
35-
12. Building with Tcl support
36-
13. Building with Terminal support
37-
14. Building with DirectX (DirectWrite) support
38-
15. Windows 3.1
39-
16. MS-DOS
40-
41-
17. Installing after building from sources
25+
2. Using MSYS2 with MinGW
26+
3. Using MinGW
27+
4. Cygwin
28+
5. Borland
29+
6. Cross compiling for Win32 from a Linux machine
30+
7. Building with Python support
31+
8. Building with Python3 support
32+
9. Building with Racket or MzScheme support
33+
10. Building with Lua support
34+
11. Building with Perl support
35+
12. Building with Ruby support
36+
13. Building with Tcl support
37+
14. Building with Terminal support
38+
15. Building with DirectX (DirectWrite) support
39+
16. Windows 3.1
40+
17. MS-DOS
41+
42+
18. Installing after building from sources
4243

4344

4445
The currently recommended way (that means it has been verified to work) is
@@ -261,8 +262,87 @@ Instructions for integrating the Platform SDK into VC Express:
261262
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx
262263

263264

265+
2. MSYS2 with MinGW
266+
===================
264267

265-
2. MinGW
268+
2.1. Setup the basic msys2 environment
269+
270+
Go to the official page of MSYS2: https://www.msys2.org
271+
Download an installer:
272+
273+
* msys2-x86_64-YYYYMMDD.exe for 64-bit Windows
274+
(Even if you want to build 32-bit Vim)
275+
* msys2-i686-YYYYMMDD.exe for 32-bit Windows
276+
277+
Execute the installer and follow the instructions to update basic packages.
278+
At the end keep the checkbox checked to run msys2 now. If needed, you can
279+
open the window from the start menu, MSYS2 64 bit / MSYS2 MSYS
280+
281+
Execute:
282+
$ pacman -Syu
283+
284+
And restart MSYS2 window (select "MSYS2 MSYS" icon from the Start Menu).
285+
Then execute:
286+
$ pacman -Su
287+
288+
If pacman complains that `catgets` and `libcatgets` conflict with another
289+
package, select `y` to remove them.
290+
291+
292+
2.2. Install additional packages for building Vim
293+
294+
The following package groups are required for building Vim:
295+
296+
* base-devel
297+
* mingw-w64-i686-toolchain (for building 32-bit Vim)
298+
* mingw-w64-x86_64-toolchain (for building 64-bit Vim)
299+
300+
Use the following command to install them:
301+
302+
$ pacman -S base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain
303+
304+
Or you can use the `pacboy` command to avoid long package names:
305+
306+
$ pacboy -S base-devel: toolchain:m
307+
308+
(See `pacboy help` for the help.)
309+
310+
311+
2.3. Keep the build environment up-to-date
312+
313+
After you have installed the build environment, you may want to keep it
314+
up-to-date (E.g. always use the latest GCC).
315+
In that case, you just need to execute the command:
316+
$ pacman -Syu
317+
318+
319+
# Build Vim
320+
321+
Select one of the following icon from the Start Menu:
322+
323+
* MSYS2 MinGW 32-bit (To build 32-bit versions of Vim)
324+
* MSYS2 MinGW 64-bit (To build 64-bit versions of Vim)
325+
326+
Go to the source directory of Vim, then execute the make command. E.g.:
327+
328+
make -f Make_ming.mak
329+
make -f Make_ming.mak GUI=no
330+
make -f Make_ming.mak GUI=no DEBUG=yes
331+
332+
NOTE: you can't execute the vim.exe in the MSYS console, open a normal Windows
333+
console for that. You need to set $PATH to be able to build there, e.g.:
334+
335+
set PATH=c:\msys64\mingw32\bin;c:\msys64\usr\bin;%PATH%
336+
337+
This command is in msys32.bat. Or or the 64 bit compiler use msys64.bat:
338+
339+
set PATH=c:\msys64\mingw64\bin;c:\msys64\usr\bin;%PATH%
340+
341+
If you have msys64 in another location you will need to adjust the paths for
342+
that.
343+
344+
345+
3. MinGW
266346
========
267347

268348
(written by Ron Aaron: <[email protected]>)
@@ -344,7 +424,7 @@ If you want National Language Support, read the file src/po/README_mingw.txt.
344424
You need to uncomment lines in Make_ming.mak to have NLS defined.
345425

346426

347-
3. Cygwin
427+
4. Cygwin
348428
=========
349429

350430
Use Make_cyg.mak with Cygwin's GCC. See
@@ -356,14 +436,14 @@ running on Unix), while with Make_cyg.mak you get a Windows application (like
356436
with the other makefiles).
357437

358438

359-
4. Borland
439+
5. Borland
360440
===========
361441

362442
Use Make_bc5.mak with Borland C++ 5.x. See
363443
http://users.skynet.be/antoine.mechelynck/vim/compile.htm
364444

365445

366-
5. Cross compiling for Win32 from a Linux machine
446+
6. Cross compiling for Win32 from a Linux machine
367447
=================================================
368448

369449
[Update of 1) needs to be verified]
@@ -383,7 +463,7 @@ your Linux (or other unix) box. To do this, you need to follow a few steps:
383463
Now you have created the Windows binary from your Linux box! Have fun...
384464

385465

386-
6. Building with Python support
466+
7. Building with Python support
387467
===============================
388468

389469
For building with MSVC 2008 the "Windows Installer" from www.python.org
@@ -435,7 +515,7 @@ And if you use msys2 to build python support (as one line):
435515
You will end up with a Python-enabled, Win32 version. Enjoy!
436516

437517

438-
7. Building with Python3 support
518+
8. Building with Python3 support
439519
================================
440520

441521
For building with MSVC 2008 the "Windows Installer" from www.python.org
@@ -466,7 +546,7 @@ When using msys2 and link with Python3 bundled with msys2 (as one line):
466546
(This is for 64-bit builds. For 32-bit builds, replace mingw64 with mingw32.)
467547

468548

469-
8. Building with Racket or MzScheme support
549+
9. Building with Racket or MzScheme support
470550
========================================
471551

472552
1) Building with Racket support (newest)
@@ -556,7 +636,7 @@ After a successful build, these dlls can be freely removed, leaving them in
556636

557637

558638

559-
9. Building with Lua support
639+
10. Building with Lua support
560640
============================
561641

562642
Vim with Lua support can be built with either MSVC or MinGW (or maybe Cygwin).
@@ -611,7 +691,7 @@ Or when using Cygwin (as one line) (untested):
611691
LUA=/cygdrive/c/projects/lua53 DYNAMIC_LUA=yes LUA_VER=53
612692

613693

614-
10. Building with Perl support
694+
11. Building with Perl support
615695
==============================
616696

617697
Vim with Perl support can be built with either MSVC or MinGW (or Cygwin).
@@ -637,7 +717,7 @@ Or when using MinGW (as one line):
637717
PERL=C:/Perl DYNAMIC_PERL=yes PERL_VER=522
638718

639719

640-
11. Building with Ruby support
720+
12. Building with Ruby support
641721
==============================
642722

643723
Vim with Ruby support can be built with either MSVC or MinGW (or Cygwin).
@@ -745,7 +825,7 @@ Ruby 2.1 or later. (Default is 0x501.)
745825

746826

747827

748-
12. Building with Tcl support
828+
13. Building with Tcl support
749829
=============================
750830

751831
Vim with Tcl support can be built with either MSVC or MinGW (or Cygwin).
@@ -777,7 +857,7 @@ Or when using MinGW (as one line):
777857
TCL=C:/Tcl86 DYNAMIC_TCL=yes TCL_VER=86 TCL_VER_LONG=8.6
778858

779859

780-
13. Building with Terminal support
860+
14. Building with Terminal support
781861
==================================
782862

783863
Vim with Terminal support can be built with either MSVC, MinGW or Cygwin.
@@ -793,7 +873,7 @@ Or when using MinGW:
793873
mingw32-make -f Make_ming.mak TERMINAL=yes
794874

795875

796-
14. Building with DirectX (DirectWrite) support
876+
15. Building with DirectX (DirectWrite) support
797877
===============================================
798878

799879
Vim with DirectX (DirectWrite) support can be built with either MSVC or MinGW.
@@ -827,20 +907,20 @@ Just set DIRECTX to yes:
827907
mingw32-make -f Make_ming.mak DIRECTX=yes
828908

829909

830-
15. Windows 3.1x
910+
16. Windows 3.1x
831911
================
832912

833913
The Windows 3.1x support was removed in patch 7.4.1364.
834914

835915

836-
16. MS-DOS
916+
17. MS-DOS
837917
==========
838918

839919
The MS-DOS support was removed in patch 7.4.1399. Only very old Vim versions
840920
work on MS-DOS because of the limited amount of memory available.
841921

842922

843-
17. Installing after building from sources
923+
18. Installing after building from sources
844924
==========================================
845925

846926
[provided by Michael Soyka, updated by Ken Takata]

src/Make_cyg_ming.mak

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,10 @@ POSTSCRIPT=no
7575
# Set to yes to enable OLE support.
7676
OLE=no
7777

78-
# Set the default $(WINVER) to make it work with WinXP.
78+
# Set the default $(WINVER). Use 0x0501 to make it work with WinXP.
7979
ifndef WINVER
80-
WINVER = 0x0501
80+
# WINVER = 0x0501
81+
WINVER = 0x0600
8182
endif
8283

8384
# Set to yes to enable Cscope support.

src/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2136,7 +2136,7 @@ test1 \
21362136
test52 test59 \
21372137
test64 test69 \
21382138
test70 test72 \
2139-
test85 test86 test87 test88 \
2139+
test86 test87 test88 \
21402140
test94 test95 test99 test108:
21412141
cd testdir; rm -f [email protected]; $(MAKE) -f Makefile [email protected] VIMPROG=../$(VIMTESTTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)
21422142

@@ -2305,6 +2305,7 @@ test_arglist \
23052305
test_syn_attr \
23062306
test_syntax \
23072307
test_system \
2308+
test_tab \
23082309
test_tabline \
23092310
test_tabpage \
23102311
test_tagcase \

src/edit.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9387,7 +9387,7 @@ ins_bs(
93879387
if (p_sta && in_indent)
93889388
want_vcol = (want_vcol / curbuf->b_p_sw) * curbuf->b_p_sw;
93899389
else
9390-
want_vcol = tabstop_start(want_vcol, curbuf->b_p_sts,
9390+
want_vcol = tabstop_start(want_vcol, get_sts_value(),
93919391
curbuf->b_p_vsts_array);
93929392
#else
93939393
want_vcol = (want_vcol / ts) * ts;
@@ -10236,9 +10236,9 @@ ins_tab(void)
1023610236
temp = (int)curbuf->b_p_sw;
1023710237
temp -= get_nolist_virtcol() % temp;
1023810238
}
10239-
else if (tabstop_count(curbuf->b_p_vsts_array) > 0 || curbuf->b_p_sts > 0)
10239+
else if (tabstop_count(curbuf->b_p_vsts_array) > 0 || curbuf->b_p_sts != 0)
1024010240
/* use 'softtabstop' when set */
10241-
temp = tabstop_padding(get_nolist_virtcol(), curbuf->b_p_sts,
10241+
temp = tabstop_padding(get_nolist_virtcol(), get_sts_value(),
1024210242
curbuf->b_p_vsts_array);
1024310243
else /* otherwise use 'tabstop' */
1024410244
temp = tabstop_padding(get_nolist_virtcol(), curbuf->b_p_ts,

src/evalfunc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6628,7 +6628,7 @@ f_has(typval_T *argvars, typval_T *rettv)
66286628
#endif
66296629
#ifdef FEAT_VTP
66306630
else if (STRICMP(name, "vcon") == 0)
6631-
n = has_vtp_working();
6631+
n = is_term_win32() && has_vtp_working();
66326632
#endif
66336633
#ifdef FEAT_NETBEANS_INTG
66346634
else if (STRICMP(name, "netbeans_enabled") == 0)

0 commit comments

Comments
 (0)