Skip to content

Commit 2a33867

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents a060c75 + 7fadbf8 commit 2a33867

Some content is hidden

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

49 files changed

+948
-490
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
language: c
2-
# trusty still has a few problems, use precise until they are solved.
3-
dist: precise
2+
dist: trusty
43

54
os:
65
- osx

Filelist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ SRC_ALL = \
134134
src/testdir/bench*.in \
135135
src/testdir/bench*.vim \
136136
src/testdir/samples/*.txt \
137+
src/testdir/if_ver*.vim \
137138
src/proto.h \
138139
src/proto/arabic.pro \
139140
src/proto/blowfish.pro \

runtime/doc/eval.txt

Lines changed: 48 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 8.0. Last change: 2017 Aug 03
1+
*eval.txt* For Vim version 8.0. Last change: 2017 Aug 06
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2369,7 +2369,7 @@ tagfiles() List tags files used
23692369
tan({expr}) Float tangent of {expr}
23702370
tanh({expr}) Float hyperbolic tangent of {expr}
23712371
tempname() String name for a temporary file
2372-
term_getattr({attr}, {what} Number get the value of attribute {what}
2372+
term_getattr({attr}, {what}) Number get the value of attribute {what}
23732373
term_getcursor({buf}) List get the cursor position of a terminal
23742374
term_getjob({buf}) Job get the job associated with a terminal
23752375
term_getline({buf}, {row}) String get a line of text from a terminal
@@ -2381,7 +2381,7 @@ term_list() List get the list of terminal buffers
23812381
term_scrape({buf}, {row}) List get row of a terminal screen
23822382
term_sendkeys({buf}, {keys}) none send keystrokes to a terminal
23832383
term_start({cmd}, {options}) Job open a terminal window and run a job
2384-
term_wait({buf}) Number wait for screen to be updated
2384+
term_wait({buf} [, {time}]) Number wait for screen to be updated
23852385
test_alloc_fail({id}, {countdown}, {repeat})
23862386
none make memory allocation fail
23872387
test_autochdir() none enable 'autochdir' during startup
@@ -4368,6 +4368,7 @@ getcompletion({pat}, {type} [, {filtered}]) *getcompletion()*
43684368
highlight highlight groups
43694369
history :history suboptions
43704370
locale locale names (as output of locale -a)
4371+
mapclear buffer argument
43714372
mapping mapping name
43724373
menu menus
43734374
messages |:messages| suboptions
@@ -7915,32 +7916,37 @@ term_getattr({attr}, {what}) *term_getattr()*
79157916
underline
79167917
strike
79177918
reverse
7919+
{only available when compiled with the |+terminal| feature}
79187920

79197921
term_getcursor({buf}) *term_getcursor()*
7920-
Get the cusor position of terminal {buf}. Returns a list with
7922+
Get the cursor position of terminal {buf}. Returns a list with
79217923
three numbers: [rows, cols, visible]. "rows" and "cols" are
7922-
one based, the first sceen cell is row 1, column 1.
7924+
one based, the first screen cell is row 1, column 1.
79237925
"visible" is one when the cursor is visible, zero when it is
79247926
hidden.
7925-
7927+
79267928
This is the cursor position of the terminal itself, not of the
79277929
Vim window.
79287930

79297931
{buf} must be the buffer number of a terminal window. If the
79307932
buffer does not exist or is not a terminal window, an empty
79317933
list is returned.
7934+
{only available when compiled with the |+terminal| feature}
79327935

79337936
term_getjob({buf}) *term_getjob()*
79347937
Get the Job associated with terminal window {buf}.
79357938
{buf} is used as with |term_getsize()|.
79367939
Returns |v:null| when there is no job.
7940+
{only available when compiled with the |+terminal| feature}
79377941

79387942
term_getline({buf}, {row}) *term_getline()*
79397943
Get a line of text from the terminal window of {buf}.
79407944
{buf} is used as with |term_getsize()|.
79417945

7942-
The first line has {row} one. When {row} "." the cursor line
7943-
is used. When {row} is invalid an empty string is returned.
7946+
The first line has {row} one. When {row} is "." the cursor
7947+
line is used. When {row} is invalid an empty string is
7948+
returned.
7949+
{only available when compiled with the |+terminal| feature}
79447950

79457951
term_getsize({buf}) *term_getsize()*
79467952
Get the size of terminal {buf}. Returns a list with two
@@ -7950,18 +7956,20 @@ term_getsize({buf}) *term_getsize()*
79507956
{buf} must be the buffer number of a terminal window. Use an
79517957
empty string for the current buffer. If the buffer does not
79527958
exist or is not a terminal window, an empty list is returned.
7959+
{only available when compiled with the |+terminal| feature}
79537960

79547961
term_getstatus({buf}) *term_getstatus()*
79557962
Get the status of terminal {buf}. This returns a comma
79567963
separated list of these items:
79577964
running job is running
79587965
finished job has finished
7959-
terminal in Terminal-Normal mode
7966+
normal in Terminal-Normal mode
79607967
One of "running" or "finished" is always present.
79617968

79627969
{buf} must be the buffer number of a terminal window. If the
79637970
buffer does not exist or is not a terminal window, an empty
79647971
string is returned.
7972+
{only available when compiled with the |+terminal| feature}
79657973

79667974
term_gettitle({buf}) *term_gettitle()*
79677975
Get the title of terminal {buf}. This is the title that the
@@ -7970,22 +7978,26 @@ term_gettitle({buf}) *term_gettitle()*
79707978
{buf} must be the buffer number of a terminal window. If the
79717979
buffer does not exist or is not a terminal window, an empty
79727980
string is returned.
7981+
{only available when compiled with the |+terminal| feature}
79737982

79747983
term_gettty({buf}) *term_gettty()*
79757984
Get the name of the controlling terminal associated with
79767985
terminal window {buf}.
79777986
{buf} is used as with |term_getsize()|.
7987+
{only available when compiled with the |+terminal| feature}
79787988

79797989
term_list() *term_list()*
79807990
Return a list with the buffer numbers of all buffers for
79817991
terminal windows.
7992+
{only available when compiled with the |+terminal| feature}
79827993

79837994
term_scrape({buf}, {row}) *term_scrape()*
79847995
Get the contents of {row} of terminal screen of {buf}.
79857996
For {buf} see |term_getsize()|.
79867997

7987-
The first line has {row} one. When {row} "." the cursor line
7988-
is used. When {row} is invalid an empty string is returned.
7998+
The first line has {row} one. When {row} is "." the cursor
7999+
line is used. When {row} is invalid an empty string is
8000+
returned.
79898001

79908002
Return a List containing a Dict for each screen cell:
79918003
"chars" character(s) at the cell
@@ -7994,25 +8006,47 @@ term_scrape({buf}, {row}) *term_scrape()*
79948006
"attr" attributes of the cell, use |term_getattr()|
79958007
to get the individual flags
79968008
"width" cell width: 1 or 2
8009+
{only available when compiled with the |+terminal| feature}
79978010

79988011
term_sendkeys({buf}, {keys}) *term_sendkeys()*
79998012
Send keystrokes {keys} to terminal {buf}.
80008013
{buf} is used as with |term_getsize()|.
80018014

80028015
{keys} are translated as key sequences. For example, "\<c-x>"
80038016
means the character CTRL-X.
8017+
{only available when compiled with the |+terminal| feature}
80048018

80058019
term_start({cmd}, {options}) *term_start()*
80068020
Open a terminal window and run {cmd} in it.
80078021

80088022
Returns the buffer number of the terminal window.
80098023
When opening the window fails zero is returned.
80108024

8011-
{options} are not implemented yet.
8012-
8013-
term_wait({buf}) *term_wait()*
8025+
{options} are similar to what is used for |job_start()|, see
8026+
|job-options|. However, not all options can be used. These
8027+
are supported:
8028+
all timeout options
8029+
"stoponexit"
8030+
"out_cb", "err_cb"
8031+
"exit_cb", "close_cb"
8032+
"in_io", "in_top", "in_bot", "in_name", "in_buf"
8033+
"out_io", "out_name", "out_buf", "out_modifiable", "out_msg"
8034+
"err_io", "err_name", "err_buf", "err_modifiable", "err_msg"
8035+
However, at least one of stdin, stdout or stderr must be
8036+
connected to the terminal. When I/O is connected to the
8037+
terminal then the callback function for that part is not used.
8038+
8039+
There is one extra option:
8040+
"term_name" name to use for the buffer name, instead of
8041+
the command name.
8042+
{only available when compiled with the |+terminal| feature}
8043+
8044+
term_wait({buf} [, {time}]) *term_wait()*
80148045
Wait for pending updates of {buf} to be handled.
80158046
{buf} is used as with |term_getsize()|.
8047+
{time} is how long to wait for updates to arrive in msec. If
8048+
not set then 10 msec will be used.
8049+
{only available when compiled with the |+terminal| feature}
80168050

80178051
test_alloc_fail({id}, {countdown}, {repeat}) *test_alloc_fail()*
80188052
This is for testing: If the memory allocation with {id} is

runtime/doc/map.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,7 @@ completion can be enabled:
12791279
-complete=highlight highlight groups
12801280
-complete=history :history suboptions
12811281
-complete=locale locale names (as output of locale -a)
1282+
-complete=mapclear buffer argument
12821283
-complete=mapping mapping name
12831284
-complete=menu menus
12841285
-complete=messages |:messages| suboptions

runtime/doc/terminal.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*terminal.txt* For Vim version 8.0. Last change: 2017 Aug 01
1+
*terminal.txt* For Vim version 8.0. Last change: 2017 Aug 05
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -61,6 +61,11 @@ the job. For example:
6161
'termkey' . send a CTRL-W to the job in the terminal
6262
'termkey' N go to terminal Normal mode, see below
6363
'termkey' CTRL-N same as CTRL-W N
64+
*t_CTRL-\_CTRL-N*
65+
The special key combination CTRL-\ CTRL-N can be used to prefix one Normal
66+
mode command. This is especially useful for remote commands, when you don't
67+
know whether Vim currently has focus in a terminal window. Note that only one
68+
Normal mode command can be used.
6469

6570

6671
Size ~
@@ -87,10 +92,14 @@ Syntax ~
8792
When the buffer associated with the terminal is wiped out the job is killed,
8893
similar to calling `job_stop(job, "kill")`
8994

95+
By default the 'bufhidden' option of the buffer will be set to "hide".
9096
So long as the job is running: If the window is closed the buffer becomes
9197
hidden. The command will not be stopped. The `:buffer` command can be used
9298
to turn the current window into a terminal window. If there are unsaved
9399
changes this fails, use ! to force, as usual.
100+
*E947*
101+
So long as the job is running, the buffer is considered modified and Vim
102+
cannot be quit easily, see |abandon|.
94103

95104
When the job has finished and no changes were made to the buffer: closing the
96105
window will wipe out the buffer.

src/GvimExt/Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,16 @@ CPU = i386
3636

3737
!ifdef SDK_INCLUDE_DIR
3838
!include $(SDK_INCLUDE_DIR)\Win32.mak
39-
!else
39+
!elseif "$(USE_WIN32MAK)"=="yes"
4040
!include <Win32.mak>
41+
!else
42+
cc = cl
43+
link = link
44+
rc = rc
45+
cflags = -nologo -c
46+
lflags = -incremental:no -nologo
47+
rcflags = /r
48+
olelibsdll = ole32.lib uuid.lib oleaut32.lib user32.lib gdi32.lib advapi32.lib
4149
!endif
4250

4351
# include CPUARG

src/Make_mvc.mak

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
# This will build the console version of Vim with no additional interfaces.
1616
# To add features, define any of the following:
1717
#
18-
# For MSVC 11 you need to specify where the Win32.mak file is, e.g.:
18+
# For MSVC 11, if you want to include Win32.mak, you need to specify
19+
# where the file is, e.g.:
1920
# SDK_INCLUDE_DIR="C:\Program Files\Microsoft SDKs\Windows\v7.1\Include"
2021
#
2122
# !!!! After changing features do "nmake clean" first !!!!
@@ -212,7 +213,7 @@ OBJDIR = $(OBJDIR)Z
212213
OBJDIR = $(OBJDIR)d
213214
!endif
214215

215-
# Win32.mak requires that CPU be set appropriately.
216+
# If you include Win32.mak, it requires that CPU be set appropriately.
216217
# To cross-compile for Win64, set CPU=AMD64 or CPU=IA64.
217218

218219
!ifdef PROCESSOR_ARCHITECTURE
@@ -253,12 +254,15 @@ MAKEFLAGS_GVIMEXT = DEBUG=yes
253254
!endif
254255

255256

256-
# Get all sorts of useful, standard macros from the Platform SDK.
257+
# Get all sorts of useful, standard macros from the Platform SDK,
258+
# if SDK_INCLUDE_DIR is set or USE_WIN32MAK is set to "yes".
257259

258260
!ifdef SDK_INCLUDE_DIR
259261
!include $(SDK_INCLUDE_DIR)\Win32.mak
260-
!else
262+
!elseif "$(USE_WIN32MAK)"=="yes"
261263
!include <Win32.mak>
264+
!else
265+
link = link
262266
!endif
263267

264268

src/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2186,6 +2186,7 @@ test_arglist \
21862186
test_functions \
21872187
test_ga \
21882188
test_getcwd \
2189+
test_getvar \
21892190
test_gf \
21902191
test_glob2regpat \
21912192
test_global \
@@ -2197,6 +2198,7 @@ test_arglist \
21972198
test_help \
21982199
test_help_tagjump \
21992200
test_hide \
2201+
test_highlight \
22002202
test_history \
22012203
test_hlsearch \
22022204
test_increment \

0 commit comments

Comments
 (0)