From f75612fd9912205870bf024e4fb20af62b096c1d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 25 Jan 2016 14:17:04 +0100 Subject: [PATCH 1/7] patch 7.4.1175 Problem: Can't build with Mingw and Cygwin. Solution: Remove extra "endif". (Christian J. Robinson) --- src/Make_cyg_ming.mak | 1 - src/version.c | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak index 5c7332e1c5..026c966bfe 100644 --- a/src/Make_cyg_ming.mak +++ b/src/Make_cyg_ming.mak @@ -693,7 +693,6 @@ ifneq ($(NETBEANS),yes) LIB += -lwsock32 endif endif -endif ifeq ($(DIRECTX),yes) # Only allow DIRECTX for a GUI build. diff --git a/src/version.c b/src/version.c index 042454f064..9568029c44 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1175, /**/ 1174, /**/ From 1d63539cc72c5be7ad875d2d48a34c4f74c096ab Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 25 Jan 2016 16:05:56 +0100 Subject: [PATCH 2/7] patch 7.4.1176 Problem: Missing change to proto file. Solution: Update the proto file. (Charles Cooper) --- src/proto/gui_w32.pro | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/proto/gui_w32.pro b/src/proto/gui_w32.pro index 6752d916fe..57c6238f87 100644 --- a/src/proto/gui_w32.pro +++ b/src/proto/gui_w32.pro @@ -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 : */ diff --git a/src/version.c b/src/version.c index 9568029c44..56d6d812d7 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1176, /**/ 1175, /**/ From 5aec481097278d7d4e6559d9db2b9c3b8aa0dd5d Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 25 Jan 2016 20:15:45 +0100 Subject: [PATCH 3/7] patch 7.4.1177 Problem: The +channel feature is not in :version output. (Tony Mechelynck) Solution: Add the feature string. --- src/version.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/version.c b/src/version.c index 56d6d812d7..298372e837 100644 --- a/src/version.c +++ b/src/version.c @@ -106,6 +106,11 @@ static char *(features[]) = #else "-byte_offset", #endif +#ifdef FEAT_CHANNEL + "+channel", +#else + "-channel", +#endif #ifdef FEAT_CINDENT "+cindent", #else @@ -741,6 +746,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1177, /**/ 1176, /**/ From 767d8c1a1ae762ecf47297c168b8c23caf05d30a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 25 Jan 2016 20:22:54 +0100 Subject: [PATCH 4/7] patch 7.4.1178 Problem: empty() doesn't work for the new special variables. Solution: Make empty() work. (Damien) --- src/eval.c | 4 ++++ src/testdir/test_viml.vim | 5 +++++ src/version.c | 2 ++ 3 files changed, 11 insertions(+) diff --git a/src/eval.c b/src/eval.c index d08269fc92..359956be1a 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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; diff --git a/src/testdir/test_viml.vim b/src/testdir/test_viml.vim index f32331a61c..6b2b6b988b 100644 --- a/src/testdir/test_viml.vim +++ b/src/testdir/test_viml.vim @@ -987,6 +987,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 "------------------------------------------------------------------------------- diff --git a/src/version.c b/src/version.c index 298372e837..0a0bc1d179 100644 --- a/src/version.c +++ b/src/version.c @@ -746,6 +746,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1178, /**/ 1177, /**/ From f4f79b84a5595c511f6fdbe4e3e1d188d97879a0 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 25 Jan 2016 20:38:30 +0100 Subject: [PATCH 5/7] patch 7.4.1179 Problem: test_writefile and test_viml do not delete the tempfile. Solution: Delete the tempfile. (Charles Cooper) Add DeleteTheScript(). --- src/testdir/test_viml.vim | 21 +++++++++++++++++---- src/testdir/test_writefile.in | 1 + src/version.c | 2 ++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/testdir/test_viml.vim b/src/testdir/test_viml.vim index 6b2b6b988b..3c140c84d7 100644 --- a/src/testdir/test_viml.vim +++ b/src/testdir/test_viml.vim @@ -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() @@ -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 diff --git a/src/testdir/test_writefile.in b/src/testdir/test_writefile.in index f2dc7d50bb..6b354c510a 100644 --- a/src/testdir/test_writefile.in +++ b/src/testdir/test_writefile.in @@ -13,6 +13,7 @@ STARTTEST :$put =readfile(f) :1 delete _ :w! test.out +:call delete(f) :qa! ENDTEST diff --git a/src/version.c b/src/version.c index 0a0bc1d179..073f551dd1 100644 --- a/src/version.c +++ b/src/version.c @@ -746,6 +746,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1179, /**/ 1178, /**/ From 7465c6375fd60eab603681bcad8a8744ddc31614 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 25 Jan 2016 22:20:27 +0100 Subject: [PATCH 6/7] patch 7.4.1180 Problem: Crash with invalid argument to glob2regpat(). Solution: Check for NULL. (Justin M. Keyes, closes #596) Add a test. --- src/eval.c | 3 ++- src/testdir/test_alot.vim | 1 + src/version.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/eval.c b/src/eval.c index 359956be1a..590834fe4a 100644 --- a/src/eval.c +++ b/src/eval.c @@ -12993,7 +12993,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); } /* diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim index aceb073f69..97454335de 100644 --- a/src/testdir/test_alot.vim +++ b/src/testdir/test_alot.vim @@ -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 diff --git a/src/version.c b/src/version.c index 073f551dd1..ee6ac48c4b 100644 --- a/src/version.c +++ b/src/version.c @@ -746,6 +746,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1180, /**/ 1179, /**/ From ac80999985299dae4a9ef56dbf31fbdb35c04c08 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 25 Jan 2016 22:44:54 +0100 Subject: [PATCH 7/7] add missing test file --- src/testdir/test_glob2regpat.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/testdir/test_glob2regpat.vim diff --git a/src/testdir/test_glob2regpat.vim b/src/testdir/test_glob2regpat.vim new file mode 100644 index 0000000000..250ab2746c --- /dev/null +++ b/src/testdir/test_glob2regpat.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