Skip to content

Commit cbebd48

Browse files
committed
Updated runtime files.
1 parent ee5aeae commit cbebd48

6 files changed

Lines changed: 94 additions & 53 deletions

File tree

runtime/doc/channel.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ Once done with the channel, disconnect it like this: >
117117
118118
Currently up to 10 channels can be in use at the same time. *E897*
119119

120-
When the channel can't be opened you will get an error message.
120+
When the channel can't be opened you will get an error message. There is a
121+
difference between MS-Windows and Unix: On Unix when the port doesn't exist
122+
ch_open() fails quickly. On MS-Windows "waittime" applies.
121123
*E898* *E899* *E900* *E901* *E902*
122124

123125
If there is an error reading or writing a channel it will be closed.
@@ -169,6 +171,9 @@ channel does not have a handler the message is dropped.
169171
On read error or ch_close() the string "DETACH" is sent, if still possible.
170172
The channel will then be inactive.
171173

174+
It is also possible to use ch_sendraw() on a JSON or JS channel. The caller
175+
is then completely responsible for correct encoding and decoding.
176+
172177
==============================================================================
173178
4. Vim commands *channel-commands*
174179

@@ -266,6 +271,8 @@ asynchronously: >
266271
This {string} can also be JSON, use |jsonencode()| to create it and
267272
|jsondecode()| to handle a received JSON message.
268273

274+
It is not possible to use |ch_sendexpr()| on a raw channel.
275+
269276
==============================================================================
270277
6. Job control *job-control*
271278

runtime/doc/eval.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2703,10 +2703,12 @@ ch_open({address} [, {argdict}]) *ch_open()*
27032703
{only available when compiled with the |+channel| feature}
27042704

27052705
ch_sendexpr({handle}, {expr} [, {callback}]) *ch_sendexpr()*
2706-
Send {expr} over JSON channel {handle}. See |channel-use|.
2706+
Send {expr} over channel {handle}. The {expr} is encoded
2707+
according to the type of channel. The function cannot be used
2708+
with a raw channel. See |channel-use|. *E912*
27072709

27082710
When {callback} is given returns immediately. Without
2709-
{callback} waits for a JSON response and returns the decoded
2711+
{callback} waits for a response and returns the decoded
27102712
expression. When there is an error or timeout returns an
27112713
empty string.
27122714

@@ -2718,8 +2720,10 @@ ch_sendexpr({handle}, {expr} [, {callback}]) *ch_sendexpr()*
27182720
{only available when compiled with the |+channel| feature}
27192721

27202722
ch_sendraw({handle}, {string} [, {callback}]) *ch_sendraw()*
2721-
Send {string} over raw channel {handle}. See |channel-raw|.
2722-
Works like |ch_sendexpr()|, but does not decode the response.
2723+
Send {string} over channel {handle}.
2724+
Works like |ch_sendexpr()|, but does not encode the request or
2725+
decode the response. The caller is responsible for the
2726+
correct contents. See |channel-use|.
27232727

27242728
{only available when compiled with the |+channel| feature}
27252729

runtime/doc/tags

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4435,7 +4435,14 @@ E902 channel.txt /*E902*
44354435
E903 channel.txt /*E903*
44364436
E904 channel.txt /*E904*
44374437
E905 channel.txt /*E905*
4438+
E906 channel.txt /*E906*
4439+
E907 eval.txt /*E907*
4440+
E908 eval.txt /*E908*
4441+
E909 eval.txt /*E909*
44384442
E91 options.txt /*E91*
4443+
E910 eval.txt /*E910*
4444+
E911 eval.txt /*E911*
4445+
E912 eval.txt /*E912*
44394446
E92 message.txt /*E92*
44404447
E93 windows.txt /*E93*
44414448
E94 windows.txt /*E94*
@@ -6811,8 +6818,13 @@ java.vim syntax.txt /*java.vim*
68116818
javascript-cinoptions indent.txt /*javascript-cinoptions*
68126819
javascript-indenting indent.txt /*javascript-indenting*
68136820
job-control channel.txt /*job-control*
6821+
job_start() eval.txt /*job_start()*
6822+
job_status() eval.txt /*job_status()*
6823+
job_stop() eval.txt /*job_stop()*
68146824
join() eval.txt /*join()*
68156825
jsbterm-mouse options.txt /*jsbterm-mouse*
6826+
jsdecode() eval.txt /*jsdecode()*
6827+
jsencode() eval.txt /*jsencode()*
68166828
jsondecode() eval.txt /*jsondecode()*
68176829
jsonencode() eval.txt /*jsonencode()*
68186830
jtags tagsrch.txt /*jtags*

runtime/doc/todo.txt

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*todo.txt* For Vim version 7.4. Last change: 2016 Feb 04
1+
*todo.txt* For Vim version 7.4. Last change: 2016 Feb 07
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -81,32 +81,36 @@ Regexp problems:
8181
Patch by Christian, 2016 Jan 29.
8282

8383
+channel:
84-
- use a timeout for connect()
85-
Patch from Yasuhiro Matsumoto, Feb 2
86-
Change connect() second argument to a dict with items:
87-
mode
88-
timeout
89-
callback
84+
- implement job control:
85+
job argument: redirect stdin/stdout
86+
job argument: killonexit
87+
let job = job_maystart('command', {address}, {options})
9088
- When receiving malformed json starting with a quote it doesn't get
9189
discarded.
90+
- add ch_status(): Whether channel is open. Perhaps also mode, timeout.
91+
When channel closes invoke channel callback.
9292
- add ch_setcallback()
9393
- add ch_settimeout()
9494
- cleanup on exit? in mch_getout() and getout().
95-
- Add more contents to channel.txt
95+
- Add a test for the channel callback.
9696
- implement debug log
97-
- implement job control:
98-
let job = job_start('command', {options})
99-
call job_stop(job)
100-
let job = job_maystart('command', {address}, {options})
101-
options:
102-
- keep running when Vim exits
103-
- add remark undo sync, is there a way to force it?
104-
- Add a test with a server that can send canned responses.
97+
- Add timestamp to queued messages and callbacks with ID, remove after a
98+
minute.
99+
- add remark about undo sync, is there a way to force it?
105100
- Add more testing in json_test.c
106101
- make sure errors lead to a useful error msg. ["ex","foobar"]
107-
- set timeout for channel.
108-
- implement check for ID in response.
109102
- json: implement UTF-16 surrogate pair.
103+
- Need way to uniquely identify a window, no matter how windows are
104+
rearranged. Same for tab pages.
105+
getwinid() ID of current winow
106+
getwinid({nr}) ID of window {nr}
107+
getwinid({nr}, {tab}) ID of window {nr} in tab page {tab}
108+
getwinnr({id}) window nr of {id} or -1 if not open
109+
gettabnr({id}) tab page nr of {id} or -1 if not open
110+
gotowin({id})
111+
Make it so that the window ID can be used where currently a window nr is used
112+
- For connection to server, a "keep open" flag would be useful. Retry
113+
connecting in the main loop with zero timeout.
110114

111115
Patch on #608: (Ken Takata)
112116
https://bitbucket.org/k_takata/vim-ktakata-mq/src/479934b94fd56b064c9e4bd8737585c5df69d56a/fix-gvimext-loadlibrary.patch?fileviewer=file-view-default
@@ -217,6 +221,8 @@ Patch to fix display of listchars on the cursorline. (Nayuri Aohime, 2013)
217221
Update suggested by Yasuhiro Matsumoto, 2014 Nov 25:
218222
https://gist.github.com/presuku/d3d6b230b9b6dcfc0477
219223

224+
Patch to add TagNotFound autocommand. (Anton Lindqvist, 2016 Feb 3)
225+
220226
Illegal memory access, requires ASAN to see. (Dominique Pelle, 2015 Jul 28)
221227

222228
Gvim: when both Tab and CTRL-I are mapped, use CTRL-I not for Tab.
@@ -265,6 +271,9 @@ Can we cache the syntax attributes, so that updates for 'relativenumber' and
265271
Build with Python on Mac does not always use the right library.
266272
(Kazunobu Kuriyama, 2015 Mar 28)
267273

274+
Patch to add GTK 3 support. (Kazunobu Kuriyama, 2016 Feb 6)
275+
Does not fully work yet.
276+
268277
Need a Vim equivalent of Python's None and a way to test for it.
269278
Use v:none. var == v:none
270279

@@ -621,6 +630,7 @@ Patch to add ":undorecover", get as much text out of the undo file as
621630
possible. (Christian Brabandt, 2014 Mar 12, update Aug 22)
622631

623632
Include Haiku port? (Adrien Destugues, Siarzhuk Zharski, 2013 Oct 24)
633+
It can replace the BeOS code, which is likely not used anymore.
624634

625635
Updated spec ftplugin. (Matěj Cepl, 2013 Oct 16)
626636

@@ -2607,7 +2617,7 @@ GUI:
26072617
Need better separation of Vim core and GUI code.
26082618
8 When fontset support is enabled, setting 'guifont' to a single font
26092619
doesn't work.
2610-
8 Menu priority for sub-menus for: Amiga, BeOS.
2620+
8 Menu priority for sub-menus for: Amiga.
26112621
8 When translating menus ignore the part after the Tab, the shortcut. So
26122622
that the same menu item with a different shortcut (e.g., for the Mac) are
26132623
still translated.

runtime/ftplugin/man.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim filetype plugin file
22
" Language: man
33
" Maintainer: SungHyun Nam <[email protected]>
4-
" Last Change: 2015 Nov 24
4+
" Last Change: 2016 Feb 04
55

66
" To make the ":Man" command available before editing a manual page, source
77
" this script from your startup vimrc file.
@@ -160,7 +160,9 @@ func <SID>GetPage(...)
160160

161161
setl ma nonu nornu nofen
162162
silent exec "norm 1GdG"
163-
let $MANWIDTH = winwidth(0)
163+
if empty($MANWIDTH)
164+
let $MANWIDTH = winwidth(0)
165+
endif
164166
silent exec "r!/usr/bin/man ".s:GetCmdArg(sect, page)." | col -b"
165167
" Remove blank lines from top and bottom.
166168
while getline(1) =~ '^\s*$'

0 commit comments

Comments
 (0)