Skip to content

Commit 57e16a3

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 63ec85b + 3e53c70 commit 57e16a3

35 files changed

Lines changed: 826 additions & 316 deletions

Filelist

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ SRC_ALL = \
1313
src/ascii.h \
1414
src/blowfish.c \
1515
src/buffer.c \
16+
src/channel.c \
1617
src/charset.c \
1718
src/crypt.c \
1819
src/crypt_zip.c \
@@ -39,8 +40,8 @@ SRC_ALL = \
3940
src/gui_beval.h \
4041
src/hardcopy.c \
4142
src/hashtab.c \
42-
src/keymap.h \
4343
src/json.c \
44+
src/keymap.h \
4445
src/macros.h \
4546
src/main.c \
4647
src/mark.c \
@@ -114,6 +115,7 @@ SRC_ALL = \
114115
src/proto.h \
115116
src/proto/blowfish.pro \
116117
src/proto/buffer.pro \
118+
src/proto/channel.pro \
117119
src/proto/charset.pro \
118120
src/proto/crypt.pro \
119121
src/proto/crypt_zip.pro \

runtime/doc/eval.txt

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 7.4. Last change: 2016 Jan 23
1+
*eval.txt* For Vim version 7.4. Last change: 2016 Jan 24
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1412,6 +1412,9 @@ v:exception The value of the exception most recently caught and not
14121412
*v:false* *false-variable*
14131413
v:false A Number with value zero. Used to put "false" in JSON. See
14141414
|jsonencode()|.
1415+
When used as a string this evaluates to "false". >
1416+
echo v:false
1417+
< false ~
14151418

14161419
*v:fcs_reason* *fcs_reason-variable*
14171420
v:fcs_reason The reason why the |FileChangedShell| event was triggered.
@@ -1489,7 +1492,7 @@ v:foldstart Used for 'foldtext': first line of closed fold.
14891492
v:hlsearch Variable that indicates whether search highlighting is on.
14901493
Setting it makes sense only if 'hlsearch' is enabled which
14911494
requires |+extra_search|. Setting this variable to zero acts
1492-
the like |:nohlsearch| command, setting it to one acts like >
1495+
like the |:nohlsearch| command, setting it to one acts like >
14931496
let &hlsearch = &hlsearch
14941497
< Note that the value is restored when returning from a
14951498
function. |function-search-undo|.
@@ -1549,10 +1552,18 @@ v:mouse_col Column number for a mouse click obtained with |getchar()|.
15491552
*v:none* *none-variable*
15501553
v:none An empty String. Used to put an empty item in JSON. See
15511554
|jsonencode()|.
1555+
When used as a number this evaluates to zero.
1556+
When used as a string this evaluates to "none". >
1557+
echo v:none
1558+
< none ~
15521559

15531560
*v:null* *null-variable*
15541561
v:null An empty String. Used to put "null" in JSON. See
15551562
|jsonencode()|.
1563+
When used as a number this evaluates to zero.
1564+
When used as a string this evaluates to "null". >
1565+
echo v:null
1566+
< null ~
15561567

15571568
*v:oldfiles* *oldfiles-variable*
15581569
v:oldfiles List of file names that is loaded from the |viminfo| file on
@@ -1722,7 +1733,9 @@ v:throwpoint The point where the exception most recently caught and not
17221733
*v:true* *true-variable*
17231734
v:true A Number with value one. Used to put "true" in JSON. See
17241735
|jsonencode()|.
1725-
1736+
When used as a string this evaluates to "true". >
1737+
echo v:true
1738+
< true ~
17261739
*v:val* *val-variable*
17271740
v:val Value of the current item of a |List| or |Dictionary|. Only
17281741
valid while evaluating the expression used with |map()| and
@@ -4234,17 +4247,26 @@ join({list} [, {sep}]) *join()*
42344247
The opposite function is |split()|.
42354248

42364249
jsondecode({string}) *jsondecode()*
4237-
TODO
4250+
This parses a JSON formatted string and returns the equivalent
4251+
in Vim values. See |jsonencode()| for the relation between
4252+
JSON and Vim values.
4253+
The decoding is permissive:
4254+
- A trailing comma in an array and object is ignored.
4255+
- An empty item in an array results in v:none.
4256+
- When an object name is not a string it is converted to a
4257+
string. E.g. the number 123 is used as the string "123".
4258+
- More floating point numbers are recognized, e.g. "1." for
4259+
"1.0".
42384260

42394261
jsonencode({expr}) *jsonencode()*
4240-
Encodode {expr} as JSON and return this as a string.
4262+
Encode {expr} as JSON and return this as a string.
42414263
The encoding is specified in:
42424264
http://www.ietf.org/rfc/rfc4627.txt
42434265
Vim values are converted as follows:
42444266
Number decimal number
42454267
Float floating point number
42464268
String in double quotes (possibly null)
4247-
Funcref nothing
4269+
Funcref not possible, error
42484270
List as an array (possibly null); when
42494271
used recursively: []
42504272
Dict as an object (possibly null); when
@@ -4253,6 +4275,13 @@ jsonencode({expr}) *jsonencode()*
42534275
v:true "true"
42544276
v:none nothing
42554277
v:null "null"
4278+
Note that using v:none is permitted, although the JSON
4279+
standard does not allow empty items. This can be useful for
4280+
omitting items in an array:
4281+
[0,,,,,5] ~
4282+
This is much more efficient than:
4283+
[0,null,null,null,null,5] ~
4284+
But a strict JSON parser will not accept it.
42564285

42574286
keys({dict}) *keys()*
42584287
Return a |List| with all the keys of {dict}. The |List| is in
@@ -6615,13 +6644,17 @@ type({expr}) The result is a Number, depending on the type of {expr}:
66156644
List: 3
66166645
Dictionary: 4
66176646
Float: 5
6647+
Boolean: 6 (v:false and v:true)
6648+
None 7 (v:null and v:none)
66186649
To avoid the magic numbers it should be used this way: >
66196650
:if type(myvar) == type(0)
66206651
:if type(myvar) == type("")
66216652
:if type(myvar) == type(function("tr"))
66226653
:if type(myvar) == type([])
66236654
:if type(myvar) == type({})
66246655
:if type(myvar) == type(0.0)
6656+
:if type(myvar) == type(v:false)
6657+
:if type(myvar) == type(v:none
66256658
66266659
undofile({name}) *undofile()*
66276660
Return the name of the undo file that would be used for a file

runtime/doc/if_mzsch.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*if_mzsch.txt* For Vim version 7.4. Last change: 2016 Jan 16
1+
*if_mzsch.txt* For Vim version 7.4. Last change: 2016 Jan 24
22

33

44
VIM REFERENCE MANUAL by Sergey Khorev
@@ -265,7 +265,7 @@ directly from Scheme. For instance: >
265265
<
266266

267267
==============================================================================
268-
7. Dynamic loading *mzscheme-dynamic* *E815*
268+
7. Dynamic loading *mzscheme-dynamic* *E815*
269269

270270
On MS-Windows the MzScheme libraries can be loaded dynamically. The |:version|
271271
output then includes |+mzscheme/dyn|.
@@ -294,7 +294,7 @@ to set the environment variable as the following: >
294294
PLTCONFIGDIR=C:\Racket63\etc
295295
<
296296
==============================================================================
297-
8. MzScheme setup *mzscheme-setup*
297+
8. MzScheme setup *mzscheme-setup* *E895*
298298

299299
Vim requires "racket/base" module for if_mzsch core (fallback to "scheme/base"
300300
if it doesn't exist), "r5rs" module for test and "raco ctool" command for

runtime/doc/tags

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4471,6 +4471,7 @@ E891 eval.txt /*E891*
44714471
E892 eval.txt /*E892*
44724472
E893 eval.txt /*E893*
44734473
E894 eval.txt /*E894*
4474+
E895 if_mzsch.txt /*E895*
44744475
E90 message.txt /*E90*
44754476
E91 options.txt /*E91*
44764477
E92 message.txt /*E92*
@@ -5786,6 +5787,7 @@ extension-removal cmdline.txt /*extension-removal*
57865787
extensions-improvements todo.txt /*extensions-improvements*
57875788
external-editor gui_mac.txt /*external-editor*
57885789
f motion.txt /*f*
5790+
false-variable eval.txt /*false-variable*
57895791
faq intro.txt /*faq*
57905792
farsi farsi.txt /*farsi*
57915793
farsi-fonts farsi.txt /*farsi-fonts*
@@ -6845,6 +6847,8 @@ javascript-cinoptions indent.txt /*javascript-cinoptions*
68456847
javascript-indenting indent.txt /*javascript-indenting*
68466848
join() eval.txt /*join()*
68476849
jsbterm-mouse options.txt /*jsbterm-mouse*
6850+
jsondecode() eval.txt /*jsondecode()*
6851+
jsonencode() eval.txt /*jsonencode()*
68486852
jtags tagsrch.txt /*jtags*
68496853
jump-motions motion.txt /*jump-motions*
68506854
jumplist motion.txt /*jumplist*
@@ -7528,13 +7532,15 @@ no-eval-feature eval.txt /*no-eval-feature*
75287532
no_buffers_menu gui.txt /*no_buffers_menu*
75297533
non-greedy pattern.txt /*non-greedy*
75307534
non-zero-arg eval.txt /*non-zero-arg*
7535+
none-variable eval.txt /*none-variable*
75317536
normal-index index.txt /*normal-index*
75327537
not-compatible usr_01.txt /*not-compatible*
75337538
not-edited editing.txt /*not-edited*
75347539
notation intro.txt /*notation*
75357540
notepad gui_w32.txt /*notepad*
75367541
nr2char() eval.txt /*nr2char()*
75377542
nroff.vim syntax.txt /*nroff.vim*
7543+
null-variable eval.txt /*null-variable*
75387544
number_relativenumber options.txt /*number_relativenumber*
75397545
numbered-function eval.txt /*numbered-function*
75407546
o insert.txt /*o*
@@ -8603,6 +8609,7 @@ toolbar-icon gui.txt /*toolbar-icon*
86038609
toupper() eval.txt /*toupper()*
86048610
tr() eval.txt /*tr()*
86058611
trojan-horse starting.txt /*trojan-horse*
8612+
true-variable eval.txt /*true-variable*
86068613
trunc() eval.txt /*trunc()*
86078614
try-conditionals eval.txt /*try-conditionals*
86088615
try-echoerr eval.txt /*try-echoerr*
@@ -8712,6 +8719,7 @@ v:dying eval.txt /*v:dying*
87128719
v:errmsg eval.txt /*v:errmsg*
87138720
v:errors eval.txt /*v:errors*
87148721
v:exception eval.txt /*v:exception*
8722+
v:false eval.txt /*v:false*
87158723
v:fcs_choice eval.txt /*v:fcs_choice*
87168724
v:fcs_reason eval.txt /*v:fcs_reason*
87178725
v:fname_diff eval.txt /*v:fname_diff*
@@ -8731,6 +8739,8 @@ v:lnum eval.txt /*v:lnum*
87318739
v:mouse_col eval.txt /*v:mouse_col*
87328740
v:mouse_lnum eval.txt /*v:mouse_lnum*
87338741
v:mouse_win eval.txt /*v:mouse_win*
8742+
v:none eval.txt /*v:none*
8743+
v:null eval.txt /*v:null*
87348744
v:oldfiles eval.txt /*v:oldfiles*
87358745
v:operator eval.txt /*v:operator*
87368746
v:option_new eval.txt /*v:option_new*
@@ -8752,6 +8762,7 @@ v:swapname eval.txt /*v:swapname*
87528762
v:termresponse eval.txt /*v:termresponse*
87538763
v:this_session eval.txt /*v:this_session*
87548764
v:throwpoint eval.txt /*v:throwpoint*
8765+
v:true eval.txt /*v:true*
87558766
v:val eval.txt /*v:val*
87568767
v:var eval.txt /*v:var*
87578768
v:version eval.txt /*v:version*

runtime/indent/vim.vim

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
" Vim indent file
22
" Language: Vim script
33
" Maintainer: Bram Moolenaar <[email protected]>
4-
" Last Change: 2014 Dec 12
4+
" Last Change: 2016 Jan 24
55

66
" Only load this indent file when no other was loaded.
77
if exists("b:did_indent")
@@ -58,19 +58,19 @@ function GetVimIndentIntern()
5858
if exists("g:vim_indent_cont")
5959
let ind = ind + g:vim_indent_cont
6060
else
61-
let ind = ind + &sw * 3
61+
let ind = ind + shiftwidth() * 3
6262
endif
6363
elseif prev_text =~ '^\s*aug\%[roup]' && prev_text !~ '^\s*aug\%[roup]\s*!\=\s\+END'
64-
let ind = ind + &sw
64+
let ind = ind + shiftwidth()
6565
else
6666
" A line starting with :au does not increment/decrement indent.
6767
if prev_text !~ '^\s*au\%[tocmd]'
6868
let i = match(prev_text, '\(^\||\)\s*\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|el\%[seif]\)\>')
6969
if i >= 0
70-
let ind += &sw
70+
let ind += shiftwidth()
7171
if strpart(prev_text, i, 1) == '|' && has('syntax_items')
7272
\ && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\)$'
73-
let ind -= &sw
73+
let ind -= shiftwidth()
7474
endif
7575
endif
7676
endif
@@ -82,15 +82,15 @@ function GetVimIndentIntern()
8282
let i = match(prev_text, '[^\\]|\s*\(ene\@!\)')
8383
if i > 0 && prev_text !~ '^\s*au\%[tocmd]'
8484
if !has('syntax_items') || synIDattr(synID(lnum, i + 2, 1), "name") !~ '\(Comment\|String\)$'
85-
let ind = ind - &sw
85+
let ind = ind - shiftwidth()
8686
endif
8787
endif
8888

8989

9090
" Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry,
9191
" :endfun, :else and :augroup END.
9292
if cur_text =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s*!\=\s\+[eE][nN][dD]\)'
93-
let ind = ind - &sw
93+
let ind = ind - shiftwidth()
9494
endif
9595

9696
return ind

src/Make_bc5.mak

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,12 @@
8686
# (BIG for WIN32, SMALL for DOS16)
8787
# WINVER 0x0400 or 0x0500: minimum Win32 version to support (0x0400)
8888
# CSCOPE no or yes: include support for Cscope interface (yes)
89-
# NETBEANS no or yes: include support for Netbeans interface (yes if GUI
89+
# NETBEANS no or yes: include support for Netbeans interface; also
90+
# requires CHANNEL (yes if GUI
9091
# is yes)
9192
# NBDEBUG no or yes: include support for debugging Netbeans interface (no)
93+
# CHANNEL no or yes: include support for inter process communication (yes
94+
# if GUI is yes)
9295
# XPM define to path to XPM dir to get support for loading XPM images.
9396

9497
### BOR: root of the BC installation
@@ -137,6 +140,11 @@ CSCOPE = yes
137140
NETBEANS = yes
138141
!endif
139142

143+
### CHANNEL: yes to enable inter process communication, no to disable it
144+
!if ("$(CHANNEL)"=="") && ("$(GUI)"=="yes")
145+
CHANNEL = yes
146+
!endif
147+
140148
### LUA: uncomment this line if you want lua support in vim
141149
# LUA=c:\lua
142150

@@ -466,6 +474,7 @@ LINK2 = -aa
466474
RESFILE = vim.res
467475
!else
468476
!undef NETBEANS
477+
!undef CHANNEL
469478
!undef XPM
470479
!undef VIMDLL
471480
!if ("$(DEBUG)"=="yes")
@@ -488,12 +497,21 @@ RESFILE = vim.res
488497
!endif
489498

490499
!if ("$(NETBEANS)"=="yes")
500+
!if ("$(CHANNEL)"!="yes")
501+
# cannot use Netbeans without CHANNEL
502+
NETBEANS = no
503+
!else
491504
DEFINES = $(DEFINES) -DFEAT_NETBEANS_INTG
492505
!if ("$(NBDEBUG)"=="yes")
493506
DEFINES = $(DEFINES) -DNBDEBUG
494507
NBDEBUG_DEP = nbdebug.h nbdebug.c
495508
!endif
496509
!endif
510+
!endif
511+
512+
!if ("$(CHANNEL)"=="yes")
513+
DEFINES = $(DEFINES) -DFEAT_CHANNEL
514+
!endif
497515

498516
!ifdef XPM
499517
!if ("$(GUI)"=="yes")
@@ -673,6 +691,11 @@ vimobj = $(vimobj) \
673691
$(OBJDIR)\netbeans.obj
674692
!endif
675693

694+
!if ("$(CHANNEL)"=="yes")
695+
vimobj = $(vimobj) \
696+
$(OBJDIR)\channel.obj
697+
!endif
698+
676699
!ifdef XPM
677700
vimobj = $(vimobj) \
678701
$(OBJDIR)\xpm_w32.obj
@@ -748,6 +771,9 @@ MSG = $(MSG) CSCOPE
748771
!if ("$(NETBEANS)"=="yes")
749772
MSG = $(MSG) NETBEANS
750773
!endif
774+
!if ("$(CHANNEL)"=="yes")
775+
MSG = $(MSG) CHANNEL
776+
!endif
751777
!ifdef XPM
752778
MSG = $(MSG) XPM
753779
!endif
@@ -1029,6 +1055,9 @@ $(OBJDIR)\xpm_w32.obj: xpm_w32.c xpm.lib
10291055
$(OBJDIR)\netbeans.obj: netbeans.c $(NBDEBUG_DEP)
10301056
$(CC) $(CCARG) $(CC1) $(CC2)$@ netbeans.c
10311057

1058+
$(OBJDIR)\channel.obj: channel.c
1059+
$(CC) $(CCARG) $(CC1) $(CC2)$@ channel.c
1060+
10321061
$(OBJDIR)\vim.res: vim.rc version.h tools.bmp tearoff.bmp \
10331062
vim.ico vim_error.ico vim_alert.ico vim_info.ico vim_quest.ico
10341063
$(BRC) -fo$(OBJDIR)\vim.res -i $(BOR)\include -w32 -r vim.rc @&&|

0 commit comments

Comments
 (0)