mirror of
https://github.com/macvim-dev/macvim.git
synced 2026-06-11 15:37:29 +02:00
Merge remote-tracking branch 'vim/master'
This commit is contained in:
@@ -693,7 +693,6 @@ ifneq ($(NETBEANS),yes)
|
||||
LIB += -lwsock32
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(DIRECTX),yes)
|
||||
# Only allow DIRECTX for a GUI build.
|
||||
|
||||
+6
-1
@@ -10578,6 +10578,10 @@ f_empty(argvars, rettv)
|
||||
n = argvars[0].vval.v_dict == NULL
|
||||
|| argvars[0].vval.v_dict->dv_hashtab.ht_used == 0;
|
||||
break;
|
||||
case VAR_SPECIAL:
|
||||
n = argvars[0].vval.v_number != VVAL_TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
EMSG2(_(e_intern2), "f_empty()");
|
||||
n = 0;
|
||||
@@ -12996,7 +13000,8 @@ f_glob2regpat(argvars, rettv)
|
||||
char_u *pat = get_tv_string_chk(&argvars[0]);
|
||||
|
||||
rettv->v_type = VAR_STRING;
|
||||
rettv->vval.v_string = file_pat_to_reg_pat(pat, NULL, NULL, FALSE);
|
||||
rettv->vval.v_string = (pat == NULL)
|
||||
? NULL : file_pat_to_reg_pat(pat, NULL, NULL, FALSE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -96,5 +96,5 @@ void gui_mch_post_balloon(BalloonEval *beval, char_u *mesg);
|
||||
BalloonEval *gui_mch_create_beval_area(void *target, char_u *mesg, void (*mesgCB)(BalloonEval *, int), void *clientData);
|
||||
void gui_mch_destroy_beval_area(BalloonEval *beval);
|
||||
void netbeans_draw_multisign_indicator(int row);
|
||||
void netbeans_init_winsock(void);
|
||||
void channel_init_winsock(void);
|
||||
/* vim: set ft=c : */
|
||||
|
||||
@@ -5,6 +5,7 @@ source test_backspace_opt.vim
|
||||
source test_cursor_func.vim
|
||||
source test_delete.vim
|
||||
source test_expand.vim
|
||||
source test_glob2regpat.vim
|
||||
source test_json.vim
|
||||
source test_lispwords.vim
|
||||
source test_menu.vim
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
" Test glob2regpat()
|
||||
|
||||
func Test_invalid()
|
||||
call assert_fails('call glob2regpat(1.33)', 'E806:')
|
||||
endfunc
|
||||
|
||||
func Test_valid()
|
||||
call assert_equal('^foo\.', glob2regpat('foo.*'))
|
||||
call assert_equal('\.vim$', glob2regpat('*.vim'))
|
||||
endfunc
|
||||
@@ -55,16 +55,26 @@ endfunction
|
||||
" ExecAsScript - Source a temporary script made from a function. {{{2
|
||||
"
|
||||
" Make a temporary script file from the function a:funcname, ":source" it, and
|
||||
" delete it afterwards.
|
||||
" delete it afterwards. However, if an exception is thrown the file may remain,
|
||||
" the caller should call DeleteTheScript() afterwards.
|
||||
let s:script_name = ''
|
||||
function! ExecAsScript(funcname)
|
||||
" Make a script from the function passed as argument.
|
||||
let script = MakeScript(a:funcname)
|
||||
let s:script_name = MakeScript(a:funcname)
|
||||
|
||||
" Source and delete the script.
|
||||
exec "source" script
|
||||
call delete(script)
|
||||
exec "source" s:script_name
|
||||
call delete(s:script_name)
|
||||
let s:script_name = ''
|
||||
endfunction
|
||||
|
||||
function! DeleteTheScript()
|
||||
if s:script_name
|
||||
call delete(s:script_name)
|
||||
let s:script_name = ''
|
||||
endif
|
||||
endfunc
|
||||
|
||||
com! -nargs=1 -bar ExecAsScript call ExecAsScript(<f-args>)
|
||||
|
||||
|
||||
@@ -143,6 +153,7 @@ func Test_endwhile_script()
|
||||
XpathINIT
|
||||
ExecAsScript T1_F
|
||||
Xpath 'F'
|
||||
call DeleteTheScript()
|
||||
|
||||
try
|
||||
ExecAsScript T1_G
|
||||
@@ -152,6 +163,7 @@ func Test_endwhile_script()
|
||||
Xpath 'x'
|
||||
endtry
|
||||
Xpath 'G'
|
||||
call DeleteTheScript()
|
||||
|
||||
call assert_equal('abcFhijxG', g:Xpath)
|
||||
endfunc
|
||||
@@ -260,6 +272,7 @@ function Test_finish()
|
||||
XpathINIT
|
||||
ExecAsScript T4_F
|
||||
Xpath '5'
|
||||
call DeleteTheScript()
|
||||
|
||||
call assert_equal('ab3e3b2c25', g:Xpath)
|
||||
endfunction
|
||||
@@ -987,6 +1000,11 @@ func Test_type()
|
||||
call assert_equal(v:true, eval(string(v:true)))
|
||||
call assert_equal(v:none, eval(string(v:none)))
|
||||
call assert_equal(v:null, eval(string(v:null)))
|
||||
|
||||
call assert_true(empty(v:false))
|
||||
call assert_false(empty(v:true))
|
||||
call assert_true(empty(v:null))
|
||||
call assert_true(empty(v:none))
|
||||
endfunc
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
|
||||
@@ -13,6 +13,7 @@ STARTTEST
|
||||
:$put =readfile(f)
|
||||
:1 delete _
|
||||
:w! test.out
|
||||
:call delete(f)
|
||||
:qa!
|
||||
ENDTEST
|
||||
|
||||
|
||||
@@ -106,6 +106,11 @@ static char *(features[]) =
|
||||
#else
|
||||
"-byte_offset",
|
||||
#endif
|
||||
#ifdef FEAT_CHANNEL
|
||||
"+channel",
|
||||
#else
|
||||
"-channel",
|
||||
#endif
|
||||
#ifdef FEAT_CINDENT
|
||||
"+cindent",
|
||||
#else
|
||||
@@ -756,6 +761,18 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1180,
|
||||
/**/
|
||||
1179,
|
||||
/**/
|
||||
1178,
|
||||
/**/
|
||||
1177,
|
||||
/**/
|
||||
1176,
|
||||
/**/
|
||||
1175,
|
||||
/**/
|
||||
1174,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user