Skip to content

Commit 5a783eb

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 57e16a3 + ac80999 commit 5a783eb

File tree

8 files changed

+58
-7
lines changed

8 files changed

+58
-7
lines changed

src/Make_cyg_ming.mak

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,6 @@ ifneq ($(NETBEANS),yes)
693693
LIB += -lwsock32
694694
endif
695695
endif
696-
endif
697696

698697
ifeq ($(DIRECTX),yes)
699698
# Only allow DIRECTX for a GUI build.

src/eval.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10578,6 +10578,10 @@ f_empty(argvars, rettv)
1057810578
n = argvars[0].vval.v_dict == NULL
1057910579
|| argvars[0].vval.v_dict->dv_hashtab.ht_used == 0;
1058010580
break;
10581+
case VAR_SPECIAL:
10582+
n = argvars[0].vval.v_number != VVAL_TRUE;
10583+
break;
10584+
1058110585
default:
1058210586
EMSG2(_(e_intern2), "f_empty()");
1058310587
n = 0;
@@ -12996,7 +13000,8 @@ f_glob2regpat(argvars, rettv)
1299613000
char_u *pat = get_tv_string_chk(&argvars[0]);
1299713001

1299813002
rettv->v_type = VAR_STRING;
12999-
rettv->vval.v_string = file_pat_to_reg_pat(pat, NULL, NULL, FALSE);
13003+
rettv->vval.v_string = (pat == NULL)
13004+
? NULL : file_pat_to_reg_pat(pat, NULL, NULL, FALSE);
1300013005
}
1300113006

1300213007
/*

src/proto/gui_w32.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,5 @@ void gui_mch_post_balloon(BalloonEval *beval, char_u *mesg);
9696
BalloonEval *gui_mch_create_beval_area(void *target, char_u *mesg, void (*mesgCB)(BalloonEval *, int), void *clientData);
9797
void gui_mch_destroy_beval_area(BalloonEval *beval);
9898
void netbeans_draw_multisign_indicator(int row);
99-
void netbeans_init_winsock(void);
99+
void channel_init_winsock(void);
100100
/* vim: set ft=c : */

src/testdir/test_alot.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ source test_backspace_opt.vim
55
source test_cursor_func.vim
66
source test_delete.vim
77
source test_expand.vim
8+
source test_glob2regpat.vim
89
source test_json.vim
910
source test_lispwords.vim
1011
source test_menu.vim

src/testdir/test_glob2regpat.vim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
" Test glob2regpat()
2+
3+
func Test_invalid()
4+
call assert_fails('call glob2regpat(1.33)', 'E806:')
5+
endfunc
6+
7+
func Test_valid()
8+
call assert_equal('^foo\.', glob2regpat('foo.*'))
9+
call assert_equal('\.vim$', glob2regpat('*.vim'))
10+
endfunc

src/testdir/test_viml.vim

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,26 @@ endfunction
5555
" ExecAsScript - Source a temporary script made from a function. {{{2
5656
"
5757
" Make a temporary script file from the function a:funcname, ":source" it, and
58-
" delete it afterwards.
58+
" delete it afterwards. However, if an exception is thrown the file may remain,
59+
" the caller should call DeleteTheScript() afterwards.
60+
let s:script_name = ''
5961
function! ExecAsScript(funcname)
6062
" Make a script from the function passed as argument.
61-
let script = MakeScript(a:funcname)
63+
let s:script_name = MakeScript(a:funcname)
6264

6365
" Source and delete the script.
64-
exec "source" script
65-
call delete(script)
66+
exec "source" s:script_name
67+
call delete(s:script_name)
68+
let s:script_name = ''
6669
endfunction
6770

71+
function! DeleteTheScript()
72+
if s:script_name
73+
call delete(s:script_name)
74+
let s:script_name = ''
75+
endif
76+
endfunc
77+
6878
com! -nargs=1 -bar ExecAsScript call ExecAsScript(<f-args>)
6979

7080

@@ -143,6 +153,7 @@ func Test_endwhile_script()
143153
XpathINIT
144154
ExecAsScript T1_F
145155
Xpath 'F'
156+
call DeleteTheScript()
146157

147158
try
148159
ExecAsScript T1_G
@@ -152,6 +163,7 @@ func Test_endwhile_script()
152163
Xpath 'x'
153164
endtry
154165
Xpath 'G'
166+
call DeleteTheScript()
155167

156168
call assert_equal('abcFhijxG', g:Xpath)
157169
endfunc
@@ -260,6 +272,7 @@ function Test_finish()
260272
XpathINIT
261273
ExecAsScript T4_F
262274
Xpath '5'
275+
call DeleteTheScript()
263276

264277
call assert_equal('ab3e3b2c25', g:Xpath)
265278
endfunction
@@ -987,6 +1000,11 @@ func Test_type()
9871000
call assert_equal(v:true, eval(string(v:true)))
9881001
call assert_equal(v:none, eval(string(v:none)))
9891002
call assert_equal(v:null, eval(string(v:null)))
1003+
1004+
call assert_true(empty(v:false))
1005+
call assert_false(empty(v:true))
1006+
call assert_true(empty(v:null))
1007+
call assert_true(empty(v:none))
9901008
endfunc
9911009

9921010
"-------------------------------------------------------------------------------

src/testdir/test_writefile.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ STARTTEST
1313
:$put =readfile(f)
1414
:1 delete _
1515
:w! test.out
16+
:call delete(f)
1617
:qa!
1718
ENDTEST
1819

src/version.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ static char *(features[]) =
106106
#else
107107
"-byte_offset",
108108
#endif
109+
#ifdef FEAT_CHANNEL
110+
"+channel",
111+
#else
112+
"-channel",
113+
#endif
109114
#ifdef FEAT_CINDENT
110115
"+cindent",
111116
#else
@@ -756,6 +761,18 @@ static char *(features[]) =
756761

757762
static int included_patches[] =
758763
{ /* Add new patch number below this line */
764+
/**/
765+
1180,
766+
/**/
767+
1179,
768+
/**/
769+
1178,
770+
/**/
771+
1177,
772+
/**/
773+
1176,
774+
/**/
775+
1175,
759776
/**/
760777
1174,
761778
/**/

0 commit comments

Comments
 (0)