Skip to content

Commit ac23466

Browse files
committed
Merge remote-tracking branch 'vim/master'
1 parent 01bbb17 commit ac23466

130 files changed

Lines changed: 4445 additions & 2052 deletions

File tree

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
@@ -30,6 +30,7 @@ SRC_ALL = \
3030
src/channel.c \
3131
src/charset.c \
3232
src/cindent.c \
33+
src/clientserver.c \
3334
src/clipboard.c \
3435
src/cmdexpand.c \
3536
src/cmdhist.c \
@@ -203,6 +204,7 @@ SRC_ALL = \
203204
src/proto/channel.pro \
204205
src/proto/charset.pro \
205206
src/proto/cindent.pro \
207+
src/proto/clientserver.pro \
206208
src/proto/clipboard.pro \
207209
src/proto/cmdexpand.pro \
208210
src/proto/cmdhist.pro \

runtime/doc/eval.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2873,6 +2873,7 @@ test_ignore_error({expr}) none ignore a specific error
28732873
test_null_blob() Blob null value for testing
28742874
test_null_channel() Channel null value for testing
28752875
test_null_dict() Dict null value for testing
2876+
test_null_function() Funcref null value for testing
28762877
test_null_job() Job null value for testing
28772878
test_null_list() List null value for testing
28782879
test_null_partial() Funcref null value for testing
@@ -6836,6 +6837,7 @@ maparg({name} [, {mode} [, {abbr} [, {dict}]]]) *maparg()*
68366837
"rhs" The {rhs} of the mapping as typed.
68376838
"silent" 1 for a |:map-silent| mapping, else 0.
68386839
"noremap" 1 if the {rhs} of the mapping is not remappable.
6840+
"script" 1 if mapping was defined with <script>.
68396841
"expr" 1 for an expression mapping (|:map-<expr>|).
68406842
"buffer" 1 for a buffer local mapping (|:map-local|).
68416843
"mode" Modes for which the mapping is defined. In

runtime/doc/testing.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ test_null_dict() *test_null_dict()*
106106
Return a |Dict| that is null. Only useful for testing.
107107

108108

109+
test_null_function() *test_null_function()*
110+
Return a |FuncRef| that is null. Only useful for testing.
111+
112+
109113
test_null_job() *test_null_job()*
110114
Return a |Job| that is null. Only useful for testing.
111115
{only available when compiled with the +job feature}

runtime/doc/vim9.txt

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*vim9.txt* For Vim version 8.2. Last change: 2020 Mar 01
1+
*vim9.txt* For Vim version 8.2. Last change: 2020 Apr 03
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -249,8 +249,8 @@ THIS IS STILL UNDER DEVELOPMENT - ANYTHING CAN BREAK - ANYTHING CAN CHANGE
249249
the function follows in the next lines, until the
250250
matching `:enddef`.
251251

252-
When {return-type} is omitted the function is not
253-
expected to return anything.
252+
When {return-type} is omitted or is "void" the
253+
function is not expected to return anything.
254254

255255
{arguments} is a sequence of zero or more argument
256256
declarations. There are three forms:
@@ -296,29 +296,40 @@ The following builtin types are supported:
296296
float
297297
string
298298
blob
299-
list<type>
300-
dict<type>
301-
(a: type, b: type): type
299+
list<{type}>
300+
dict<{type}>
302301
job
303302
channel
304303
func
305-
partial
304+
func({type}, ...)
305+
func({type}, ...): {type}
306306

307307
Not supported yet:
308-
tuple<a: type, b: type, ...>
308+
tuple<a: {type}, b: {type}, ...>
309309

310-
These types can be used in declarations, but no variable will have this type:
311-
type|type
310+
These types can be used in declarations, but no value will have this type:
311+
{type}|{type}
312312
void
313313
any
314314

315-
There is no array type, use list<type> instead. For a list constant an
315+
There is no array type, use list<{type}> instead. For a list constant an
316316
efficient implementation is used that avoids allocating lot of small pieces of
317317
memory.
318318

319-
A function defined with `:def` must declare the return type. If there is no
320-
type then the function doesn't return anything. "void" is used in type
321-
declarations.
319+
A partial and function can be declared in more or less specific ways:
320+
func any kind of function reference, no type
321+
checking
322+
func: {type} any number and type of arguments with specific
323+
return type
324+
func({type} ...) function with argument types, does not return
325+
a value
326+
func({type} ...): {type} function with argument types and return type
327+
328+
If the return type is "void" the function does not return a value.
329+
330+
The reference can also be a |Partial|, in which case it stores extra arguments
331+
and/or a dictionary, which are not visible to the caller. Since they are
332+
called in the same way the declaration is the same.
322333

323334
Custom types can be defined with `:type`: >
324335
:type MyList list<string>

src/Make_cyg_ming.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ OBJ = \
710710
$(OUTDIR)/change.o \
711711
$(OUTDIR)/charset.o \
712712
$(OUTDIR)/cindent.o \
713+
$(OUTDIR)/clientserver.o \
713714
$(OUTDIR)/clipboard.o \
714715
$(OUTDIR)/cmdexpand.o \
715716
$(OUTDIR)/cmdhist.o \

src/Make_morph.mak

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ SRC = arabic.c \
3333
change.c \
3434
charset.c \
3535
cindent.c \
36+
clientserver.c \
3637
clipboard.c \
3738
cmdexpand.c \
3839
cmdhist.c \

src/Make_mvc.mak

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,7 @@ OBJ = \
730730
$(OUTDIR)\change.obj \
731731
$(OUTDIR)\charset.obj \
732732
$(OUTDIR)\cindent.obj \
733+
$(OUTDIR)\clientserver.obj \
733734
$(OUTDIR)\clipboard.obj \
734735
$(OUTDIR)\cmdexpand.obj \
735736
$(OUTDIR)\cmdhist.obj \
@@ -1516,6 +1517,8 @@ $(OUTDIR)/charset.obj: $(OUTDIR) charset.c $(INCL)
15161517

15171518
$(OUTDIR)/cindent.obj: $(OUTDIR) cindent.c $(INCL)
15181519

1520+
$(OUTDIR)/clientserver.obj: $(OUTDIR) clientserver.c $(INCL)
1521+
15191522
$(OUTDIR)/clipboard.obj: $(OUTDIR) clipboard.c $(INCL)
15201523

15211524
$(OUTDIR)/cmdexpand.obj: $(OUTDIR) cmdexpand.c $(INCL)
@@ -1865,6 +1868,7 @@ proto.h: \
18651868
proto/change.pro \
18661869
proto/charset.pro \
18671870
proto/cindent.pro \
1871+
proto/clientserver.pro \
18681872
proto/clipboard.pro \
18691873
proto/cmdexpand.pro \
18701874
proto/cmdhist.pro \

src/Make_vms.mms

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ SRC = \
306306
change.c \
307307
charset.c \
308308
cindent.c \
309+
clientserver.c \
309310
clipboard.c \
310311
cmdexpand.c \
311312
cmdhist.c \
@@ -413,6 +414,7 @@ OBJ = \
413414
change.obj \
414415
charset.obj \
415416
cindent.obj \
417+
clientserver.obj \
416418
clipboard.obj \
417419
cmdexpand.obj \
418420
cmdhist.obj \
@@ -702,6 +704,10 @@ cindent.obj : cindent.c vim.h [.auto]config.h feature.h os_unix.h \
702704
ascii.h keymap.h term.h macros.h structs.h regexp.h \
703705
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
704706
globals.h
707+
clientserver.obj : clientserver.c vim.h [.auto]config.h feature.h os_unix.h \
708+
ascii.h keymap.h term.h macros.h structs.h regexp.h \
709+
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \
710+
globals.h
705711
clipboard.obj : clipboard.c vim.h [.auto]config.h feature.h os_unix.h \
706712
ascii.h keymap.h term.h macros.h structs.h regexp.h \
707713
gui.h beval.h [.proto]gui_beval.pro option.h ex_cmds.h proto.h \

src/Makefile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,9 +691,12 @@ LINT_OPTIONS = -beprxzF
691691

692692

693693
# Uncomment one of the next two lines to compile Vim with the
694-
# address sanitizer or with the undefined sanitizer. Works with gcc and
694+
# address sanitizer (asan) or with the undefined sanitizer. Works with gcc and
695695
# clang. May make Vim twice as slow. Errors reported on stderr.
696696
# More at: https://code.google.com/p/address-sanitizer/
697+
# Useful environment variables:
698+
# $ export ASAN_OPTIONS="print_stacktrace=1 log_path=asan"
699+
# $ export LSAN_OPTIONS="suppressions=$cwd/testdir/lsan-suppress.txt"
697700
#SANITIZER_CFLAGS = -g -O0 -fsanitize=address -fno-omit-frame-pointer
698701
#SANITIZER_CFLAGS = -g -O0 -fsanitize=undefined -fno-omit-frame-pointer
699702
SANITIZER_LIBS = $(SANITIZER_CFLAGS)
@@ -1616,6 +1619,7 @@ BASIC_SRC = \
16161619
change.c \
16171620
charset.c \
16181621
cindent.c \
1622+
clientserver.c \
16191623
clipboard.c \
16201624
cmdexpand.c \
16211625
cmdhist.c \
@@ -1761,6 +1765,7 @@ OBJ_COMMON = \
17611765
objects/blob.o \
17621766
objects/blowfish.o \
17631767
objects/cindent.o \
1768+
objects/clientserver.o \
17641769
objects/clipboard.o \
17651770
objects/cmdexpand.o \
17661771
objects/cmdhist.o \
@@ -1922,6 +1927,7 @@ PRO_AUTO = \
19221927
channel.pro \
19231928
charset.pro \
19241929
cindent.pro \
1930+
clientserver.pro \
19251931
clipboard.pro \
19261932
cmdexpand.pro \
19271933
cmdhist.pro \
@@ -3143,6 +3149,9 @@ objects/charset.o: charset.c
31433149
objects/cindent.o: cindent.c
31443150
$(CCC) -o $@ cindent.c
31453151

3152+
objects/clientserver.o: clientserver.c
3153+
$(CCC) -o $@ clientserver.c
3154+
31463155
objects/clipboard.o: clipboard.c
31473156
$(CCC) -o $@ clipboard.c
31483157

@@ -3809,6 +3818,10 @@ objects/cindent.o: cindent.c vim.h protodef.h auto/config.h feature.h os_unix.h
38093818
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
38103819
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
38113820
proto.h globals.h
3821+
objects/clientserver.o: clientserver.c vim.h protodef.h auto/config.h feature.h os_unix.h \
3822+
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
3823+
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \
3824+
proto.h globals.h
38123825
objects/clipboard.o: clipboard.c vim.h protodef.h auto/config.h feature.h os_unix.h \
38133826
auto/osdef.h ascii.h keymap.h term.h macros.h option.h beval.h \
38143827
proto/gui_beval.pro structs.h regexp.h gui.h alloc.h ex_cmds.h spell.h \

src/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ buffer.c | manipulating buffers (loaded files)
3030
bufwrite.c | writing a buffer to file
3131
change.c | handling changes to text
3232
cindent.c | C and Lisp indentation
33+
clientserver.c | client server functionality
3334
clipboard.c | handling the clipboard
3435
cmdexpand.c | command-line completion
3536
cmdhist.c | command-line history

0 commit comments

Comments
 (0)