Skip to content

Commit 937f6a1

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 4cc617e + decb14d commit 937f6a1

Some content is hidden

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

61 files changed

+6229
-8379
lines changed

Filelist

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ SRC_DOS = \
300300
src/Make_dvc.mak \
301301
src/Make_ming.mak \
302302
src/Make_mvc.mak \
303-
src/Make_w16.mak \
304303
src/bigvim.bat \
305304
src/bigvim64.bat \
306305
src/msvcsetup.bat \
@@ -314,10 +313,7 @@ SRC_DOS = \
314313
src/glbl_ime.h \
315314
src/gui_dwrite.cpp \
316315
src/gui_dwrite.h \
317-
src/gui_w16.c \
318316
src/gui_w32.c \
319-
src/gui_w48.c \
320-
src/guiw16rc.h \
321317
src/gui_w32_rc.h \
322318
src/if_ole.cpp \
323319
src/if_ole.h \
@@ -329,16 +325,12 @@ SRC_DOS = \
329325
src/os_msdos.h \
330326
src/os_w32dll.c \
331327
src/os_w32exe.c \
332-
src/os_win16.c \
333328
src/os_win32.c \
334329
src/os_mswin.c \
335-
src/os_win16.h \
336330
src/os_win32.h \
337-
src/proto/gui_w16.pro \
338331
src/proto/gui_w32.pro \
339332
src/proto/if_ole.pro \
340333
src/proto/os_msdos.pro \
341-
src/proto/os_win16.pro \
342334
src/proto/os_win32.pro \
343335
src/proto/os_mswin.pro \
344336
src/testdir/Make_dos.mak \
@@ -349,8 +341,6 @@ SRC_DOS = \
349341
src/vim.rc \
350342
src/vimio.h \
351343
src/gvim.exe.mnf \
352-
src/vim16.def \
353-
src/vim16.rc \
354344
src/vimrun.c \
355345
src/vimtbar.h \
356346
src/xpm_w32.c \
@@ -390,7 +380,6 @@ SRC_DOS_BIN = \
390380
src/VisVim/Res/*.bmp \
391381
src/tearoff.bmp \
392382
src/tools.bmp \
393-
src/tools16.bmp \
394383
src/vim*.ico \
395384
src/vim.tlb \
396385
src/vimtbar.lib \

runtime/autoload/netrw.vim

Lines changed: 801 additions & 571 deletions
Large diffs are not rendered by default.

runtime/doc/change.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,11 @@ CTRL-X Subtract [count] from the number or alphabetic
409409
{Visual}CTRL-X Subtract [count] from the number or alphabetic
410410
character in the highlighted text. {not in Vi}
411411

412+
On MS-Windows, this is mapped to cut Visual text
413+
|dos-standard-mappings|. If you want to disable the
414+
mapping, use this: >
415+
silent! vunmap <C-X>
416+
<
412417
*v_g_CTRL-X*
413418
{Visual}g CTRL-X Subtract [count] from the number or alphabetic
414419
character in the highlighted text. If several lines

runtime/doc/channel.txt

Lines changed: 61 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*channel.txt* For Vim version 7.4. Last change: 2016 Feb 16
1+
*channel.txt* For Vim version 7.4. Last change: 2016 Feb 20
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -121,6 +121,13 @@ Use |ch_status()| to see if the channel could be opened.
121121
"nl" - Use messages that end in a NL character
122122
"raw" - Use raw messages
123123

124+
"in-mode" mode specifically for stdin, only when using pipes
125+
"out-mode" mode specifically for stdout, only when using pipes
126+
"err-mode" mode specifically for stderr, only when using pipes
127+
Note: when setting "mode" the part specific mode is
128+
overwritten. Therefore set "mode" first and the part specific
129+
mode later.
130+
124131
*channel-callback*
125132
"callback" A function that is called when a message is received that is
126133
not handled otherwise. It gets two arguments: the channel
@@ -130,9 +137,13 @@ Use |ch_status()| to see if the channel could be opened.
130137
endfunc
131138
let channel = ch_open("localhost:8765", {"callback": "Handle"})
132139
<
133-
TODO:
140+
"out-cb" A function like "callback" but used for stdout. Only for when
141+
the channel uses pipes. When "out-cb" wasn't set the channel
142+
callback is used.
143+
134144
"err-cb" A function like "callback" but used for stderr. Only for when
135-
the channel uses pipes.
145+
the channel uses pipes. When "err-cb" wasn't set the channel
146+
callback is used.
136147

137148
TODO:
138149
"close-cb" A function that is called when the channel gets closed, other
@@ -144,18 +155,23 @@ Use |ch_status()| to see if the channel could be opened.
144155
useful if the server is supposed to be running already. A
145156
negative number waits forever.
146157

147-
"timeout" The time to wait for a request when blocking, using
148-
ch_sendexpr(). Again in milliseconds. The default is 2000 (2
158+
"timeout" The time to wait for a request when blocking, E.g. when using
159+
ch_sendexpr(). In milliseconds. The default is 2000 (2
149160
seconds).
150161

162+
"out-timeout" Timeout for stdout. Only when using pipes.
163+
"err-timeout" Timeout for stderr. Only when using pipes.
164+
Note: when setting "timeout" the part specific mode is
165+
overwritten. Therefore set "timeout" first and the part
166+
specific mode later.
167+
151168
When "mode" is "json" or "js" the "msg" argument is the body of the received
152169
message, converted to Vim types.
153170
When "mode" is "raw" the "msg" argument is the whole message as a string.
154171

155172
When "mode" is "json" or "js" the "callback" is optional. When omitted it is
156173
only possible to receive a message after sending one.
157174

158-
TODO:
159175
To change the channel options after opening it use ch_setoptions(). The
160176
arguments are similar to what is passed to ch_open(), but "waittime" cannot be
161177
given, since that only applies to opening the channel.
@@ -233,8 +249,8 @@ message, it must use the number zero:
233249
Then channel handler will then get {response} converted to Vim types. If the
234250
channel does not have a handler the message is dropped.
235251

236-
On read error or ch_close() the string "DETACH" is sent, if still possible.
237-
The channel will then be inactive.
252+
On read error or ch_close(), when using a socket, the string "DETACH" is sent,
253+
if still possible. The channel will then be inactive.
238254

239255
It is also possible to use ch_sendraw() on a JSON or JS channel. The caller
240256
is then completely responsible for correct encoding and decoding.
@@ -249,8 +265,10 @@ Possible commands are: *E903* *E904* *E905*
249265
["redraw" {forced}]
250266
["ex", {Ex command}]
251267
["normal", {Normal mode command}]
252-
["eval", {expression}, {number}]
268+
["expr", {expression}, {number}]
253269
["expr", {expression}]
270+
["call", {func name}, {argument list}, {number}]
271+
["call", {func name}, {argument list}]
254272

255273
With all of these: Be careful what these commands do! You can easily
256274
interfere with what the user is doing. To avoid trouble use |mode()| to check
@@ -291,27 +309,44 @@ mapped. Example to open the folds under the cursor:
291309
["normal" "zO"]
292310

293311

294-
Command "eval" ~
312+
Command "expr" with response ~
295313

296-
The "eval" command an be used to get the result of an expression. For
314+
The "expr" command can be used to get the result of an expression. For
297315
example, to get the number of lines in the current buffer:
298-
["eval","line('$')"] ~
316+
["expr","line('$')", -2] ~
299317

300-
it will send back the result of the expression:
318+
It will send back the result of the expression:
319+
[-2, "last line"] ~
320+
The format is:
301321
[{number}, {result}]
322+
*E915*
302323
Here {number} is the same as what was in the request. Use a negative number
303-
to avoid confusion with message that Vim sends.
324+
to avoid confusion with message that Vim sends. Use a different number on
325+
every request to be able to match the request with the response.
304326

305327
{result} is the result of the evaluation and is JSON encoded. If the
306328
evaluation fails or the result can't be encoded in JSON it is the string
307329
"ERROR".
308330

309331

310-
Command "expr" ~
332+
Command "expr" without a response ~
311333

312-
The "expr" command is similar to "eval", but does not send back any response.
334+
This command is similar to "expr" above, but does not send back any response.
313335
Example:
314336
["expr","setline('$', ['one', 'two', 'three'])"] ~
337+
There is no third argument in the request.
338+
339+
340+
Command "call" ~
341+
342+
This is similar to "expr", but instead of passing the whole expression as a
343+
string this passes the name of a function and a list of arguments. This
344+
avoids the conversion of the arguments to a string and escaping and
345+
concatenating them. Example:
346+
["call", "line", ["$"], -2] ~
347+
348+
Leave out the fourth argument if no response is to be sent:
349+
["call", "setline", ["$", ["one", "two", "three"]]] ~
315350

316351
==============================================================================
317352
6. Using a RAW or NL channel *channel-raw*
@@ -356,20 +391,18 @@ are:
356391
TODO:
357392
To objain the job associated with a channel: ch_getjob(channel)
358393

359-
TODO:
360394
To read one message from a channel: >
361395
let output = ch_read(channel)
362396
This uses the channel timeout. To read without a timeout, just get any
363397
message that is available: >
364-
let output = ch_read(channel, 0)
398+
let output = ch_read(channel, {'timeout': 0})
365399
When no message was available then the result is v:none for a JSON or JS mode
366400
channels, an empty string for a RAW or NL channel.
367401

368-
To read all output from a RAW or NL channel that is available: >
369-
let output = ch_readall(channel)
402+
To read all output from a RAW channel that is available: >
403+
let output = ch_readraw(channel)
370404
To read the error output: >
371-
let output = ch_readall(channel, "err")
372-
TODO: use channel timeout, no timeout or specify timeout?
405+
let output = ch_readraw(channel, {"part": "err"})
373406
374407
==============================================================================
375408
8. Starting a job with a channel *job-start* *job*
@@ -450,13 +483,15 @@ This gives the job some time to make the port available.
450483
The {options} argument in job_start() is a dictionary. All entries are
451484
optional. The same options can be used with job_setoptions(job, {options}).
452485

453-
TODO: *job-out-cb*
454-
"callback": handler
486+
*job-callback*
487+
"callback": handler Callback for something to read on any part of the
488+
channel.
489+
*job-out-cb*
455490
"out-cb": handler Callback for when there is something to read on
456491
stdout.
457-
TODO: *job-err-cb*
492+
*job-err-cb*
458493
"err-cb": handler Callback for when there is something to read on
459-
stderr. Defaults to the same callback as "out-cb".
494+
stderr.
460495
TODO: *job-close-cb*
461496
"close-cb": handler Callback for when the channel is closed. Same as
462497
"close-cb" on ch_open().

runtime/doc/editing.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*editing.txt* For Vim version 7.4. Last change: 2016 Feb 11
1+
*editing.txt* For Vim version 7.4. Last change: 2016 Feb 16
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1016,7 +1016,7 @@ the newly written file (it might be there but contain bogus data). In that
10161016
case try recovery, because the swap file is synced to disk and might still be
10171017
there. |:recover|
10181018

1019-
The directories given with the 'backupdir' option is used to put the backup
1019+
The directories given with the 'backupdir' option are used to put the backup
10201020
file in. (default: same directory as the written file).
10211021

10221022
Whether the backup is a new file, which is a copy of the original file, or the

0 commit comments

Comments
 (0)