Re: Test Failure in test_terminal3.vim
Elimar Riesebieter wrote: > * Elimar Riesebieter [2020-07-15 08:52 +0200]: > > > Hi all, > > > > tried to build 8.2.1216 on amd64 within a tmux session using shadow > > dirs and got: > > > > >From test_terminal3.vim: > > Found errors in Test_terminal_getwinpos(): > > Run 1: > > function > > RunTheTest[39]..Test_terminal_getwinpos[16]..WaitForAssert[2]..7_WaitForCommon[11]..58 > > line 1: Pattern '\\[\\d\\+, \\d\\+\\]' does not match '[-1, -1]\[ occurs > > 34 times]0,0-1 All' > > function RunTheTest[39]..Test_terminal_getwinpos line 32: Expected > > range 1 - 1142, but got 0 > > function RunTheTest[39]..Test_terminal_getwinpos line 33: Expected > > range 1 - 419, but got 0 > > > As of 8.2.1287 for some not comprehensible reasons the tests are > running fine now. > > Sorry for the noise- The terminal tests were hanging on Travis once in a while, for unknown reasons. I split off some tests to separate files, since then I haven't seen the hang. Might be correlated with your problem? -- hundred-and-one symptoms of being an internet addict: 88. Every single time you press the 'Get mail' button...it does get new mail. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202007251755.06PHtTqE380545%40masaka.moolenaar.net.
Re: Patch 8.2.1292
Dominique wrote: > Bram Moolenaar wrote: > > > Patch 8.2.1292 > > Problem:AIDL filetype not recognized. > > Solution: Add filetype detection. (Dominique Pellé, closes #6533) > > Files: runtime/filetype.vim, src/testdir/test_filetype.vim > > Hi > > The patch is missing file runtime/syntax/aidl.vim > which was in the PR https://github.com/vim/vim/pull/6533/files That will be in the next runtime files update. The changes to filetype.vim are in a patch to keep it in sync with the tests. -- hundred-and-one symptoms of being an internet addict: 87. Everyone you know asks why your phone line is always busy ...and you tell them to send an e-mail. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202007251755.06PHtT7K380533%40masaka.moolenaar.net.
Re: Patch 8.2.1293
I wrote: > Patch 8.2.1293 > Problem:Vim9: :execute mixes up () expression and function call. > Solution: Do not skip white space when looking for the "(". (closes #6531) > Files: src/vim9compile.c, src/testdir/test_vim9_script.vim Patch 8.2.1293 and 8.2.1294 were mixed up a bit, sorry about that. -- Ed's Radiator Shop: The Best Place in Town to Take a Leak. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202007251755.06PHtT36380539%40masaka.moolenaar.net.
Patch 8.2.1294
Patch 8.2.1294 Problem:Vim9: error when using vim9script in TextYankPost. Solution: Use EX_LOCKOK instead of the EX_CMDWIN flag for command that can be used when text is locked. (closes #6529) Files: src/ex_cmds.h, src/ex_docmd.c *** ../vim-8.2.1293/src/ex_cmds.h 2020-06-24 21:00:20.627874946 +0200 --- src/ex_cmds.h 2020-07-25 17:47:48.060795976 +0200 *** *** 47,59 #define EX_BUFUNL 0x1 // accepts unlisted buffer too #define EX_ARGOPT 0x2 // allow "++opt=val" argument #define EX_SBOXOK 0x4 // allowed in the sandbox ! #define EX_CMDWIN 0x8 // allowed in cmdline window; when missing ! // disallows editing another buffer when ! // curbuf_lock is set #define EX_MODIFY0x10 // forbidden in non-'modifiable' buffer #define EX_FLAGS 0x20 // allow flags after count in argument #define EX_RESTRICT 0x40 // forbidden in restricted mode #define EX_EXPAND0x80 // expands wildcards later #define EX_FILES (EX_XFILE | EX_EXTRA)// multiple extra files allowed #define EX_FILE1 (EX_FILES | EX_NOSPC)// 1 file, defaults to current file --- 47,60 #define EX_BUFUNL 0x1 // accepts unlisted buffer too #define EX_ARGOPT 0x2 // allow "++opt=val" argument #define EX_SBOXOK 0x4 // allowed in the sandbox ! #define EX_CMDWIN 0x8 // allowed in cmdline window #define EX_MODIFY0x10 // forbidden in non-'modifiable' buffer #define EX_FLAGS 0x20 // allow flags after count in argument #define EX_RESTRICT 0x40 // forbidden in restricted mode #define EX_EXPAND0x80 // expands wildcards later + #define EX_LOCK_OK 0x100 // command can be executed when textlock is + // set; when missing disallows editing another + // buffer when curbuf_lock is set #define EX_FILES (EX_XFILE | EX_EXTRA)// multiple extra files allowed #define EX_FILE1 (EX_FILES | EX_NOSPC)// 1 file, defaults to current file *** *** 109,121 #endif { EXCMD(CMD_append, "append", ex_append, ! EX_BANG|EX_RANGE|EX_ZEROR|EX_TRLBAR|EX_CMDWIN|EX_MODIFY, ADDR_LINES), EXCMD(CMD_abbreviate, "abbreviate", ex_abbreviate, ! EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN, ADDR_NONE), EXCMD(CMD_abclear,"abclear", ex_abclear, ! EX_EXTRA|EX_TRLBAR|EX_CMDWIN, ADDR_NONE), EXCMD(CMD_aboveleft, "aboveleft",ex_wrongmodifier, EX_NEEDARG|EX_EXTRA|EX_NOTRLCOM, --- 110,122 #endif { EXCMD(CMD_append, "append", ex_append, ! EX_BANG|EX_RANGE|EX_ZEROR|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK|EX_MODIFY, ADDR_LINES), EXCMD(CMD_abbreviate, "abbreviate", ex_abbreviate, ! EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_abclear,"abclear", ex_abclear, ! EX_EXTRA|EX_TRLBAR|EX_CMDWIN|EX_LOCK_OK, ADDR_NONE), EXCMD(CMD_aboveleft, "aboveleft",ex_wrongmodifier, EX_NEEDARG|EX_EXTRA|EX_NOTRLCOM, *** *** 124,133 EX_BANG|EX_RANGE|EX_COUNT|EX_TRLBAR, ADDR_OTHER), EXCMD(CMD_amenu, "amenu",ex_menu, ! EX_RANGE|EX_ZEROR|EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN, ADDR_OTHER), EXCMD(CMD_anoremenu, "anoremenu",ex_menu, ! EX_RANGE|EX_ZEROR|EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN, ADDR_OTHER), EXCMD(CMD_args, "args", ex_args, EX_BANG|EX_FILES|EX_CMDARG|EX_ARGOPT|EX_TRLBAR, --- 125,134 EX_BANG|EX_RANGE|EX_COUNT|EX_TRLBAR, ADDR_OTHER), EXCMD(CMD_amenu, "amenu",ex_menu, ! EX_RANGE|EX_ZEROR|EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN|EX_LOCK_OK, ADDR_OTHER), EXCMD(CMD_anoremenu, "anoremenu",ex_menu, ! EX_RANGE|EX_ZEROR|EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN|EX_LOCK_OK, ADDR_OTHER), EXCMD(CMD_args, "args", ex_args, EX_BANG|EX_FILES|EX_CMDARG|EX_ARGOPT|EX_TRLBAR, *** *** 154,169 EX_BANG|EX_RANGE|EX_COUNT|EX_EXTRA|EX_CMDARG|EX_ARGOPT|EX_TRLBAR, ADDR_ARGUMENTS), EXCMD(CMD_ascii, "ascii",do_ascii, ! EX_TRLBAR|EX_SBOXOK|EX_CMDWIN, ADDR_NONE), EXCMD(CMD_autocmd,"autocmd", ex_autocmd, ! EX_BANG|EX_EXTRA|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN, ADDR_NONE), EXCMD(CMD_augroup,"augroup", ex_autocmd, ! EX_BANG|EX_WORD1|EX_TRLBAR|EX_CMDWIN, ADDR_NONE), EXCMD(CMD_aunmenu,"aunmenu", ex_menu, ! EX_EXTRA|EX_TRLBAR|EX_NOTRLCOM|EX_CTRLV|EX_CMDWIN, ADDR_NONE), EXCMD(CMD_buffer, "buffer", ex_buffer, EX_BANG|EX_RANGE|EX_BUFNAME|EX_BUFUNL|EX_COUNT|EX_EXTRA|EX_CMDARG|EX_TRLBAR,
Patch 8.2.1293
Patch 8.2.1293 Problem:Vim9: :execute mixes up () expression and function call. Solution: Do not skip white space when looking for the "(". (closes #6531) Files: src/vim9compile.c, src/testdir/test_vim9_script.vim *** ../vim-8.2.1292/src/vim9compile.c 2020-07-23 22:41:39.779937421 +0200 --- src/vim9compile.c 2020-07-25 19:18:14.995776840 +0200 *** *** 3755,3761 } } ! if (*p == '(') { garray_T*stack = >ctx_type_stack; type_T *type; --- 3755,3763 } } ! // Do not skip over white space to find the "(", "exeucte 'x' ()" is ! // not a function call. ! if (**arg == '(') { garray_T*stack = >ctx_type_stack; type_T *type; *** ../vim-8.2.1292/src/testdir/test_vim9_script.vim2020-07-25 15:41:04.408638663 +0200 --- src/testdir/test_vim9_script.vim2020-07-25 19:27:17.304934434 +0200 *** *** 1708,1713 --- 1708,1717 assert_equal('execute-var-var', getline(1)) bwipe! + let n = true + execute 'echomsg' (n ? '"true"' : '"no"') + assert_match('^true$', Screenline()) + call CheckDefFailure(['execute xxx'], 'E1001:') call CheckDefFailure(['execute "cmd"# comment'], 'E488:') enddef *** *** 2634,2639 --- 2638,2669 quit enddef + " test using a vim9script that is auto-loaded from an autocmd + def Test_vim9_autoload() + let lines =<< trim END + vim9script + def foo#test() + echomsg getreg('"') + enddef + END + + mkdir('Xdir/autoload', 'p') + writefile(lines, 'Xdir/autoload/foo.vim') + let save_rtp = + exe 'set rtp^=' .. getcwd() .. '/Xdir' + augroup test + autocmd TextYankPost * call foo#test() + augroup END + + normal Y + + augroup test + autocmd! + augroup END + delete('Xdir', 'rf') += save_rtp + enddef + " Keep this last, it messes up highlighting. def Test_substitute_cmd() new *** ../vim-8.2.1292/src/version.c 2020-07-25 16:53:07.938737495 +0200 --- src/version.c 2020-07-25 17:35:40.996621160 +0200 *** *** 756,757 --- 756,759 { /* Add new patch number below this line */ + /**/ + 1293, /**/ -- hundred-and-one symptoms of being an internet addict: 85. Choice between paying Compuserve bill and paying for kids education is a no brainer -- although a bit painful for your kids. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202007251739.06PHd44u372369%40masaka.moolenaar.net.
Re: Patch 8.2.1292
Bram Moolenaar wrote: > Patch 8.2.1292 > Problem:AIDL filetype not recognized. > Solution: Add filetype detection. (Dominique Pellé, closes #6533) > Files: runtime/filetype.vim, src/testdir/test_filetype.vim Hi The patch is missing file runtime/syntax/aidl.vim which was in the PR https://github.com/vim/vim/pull/6533/files Regards Dominique -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAON-T_iaJ-RT_eXMaWLA0WX%3D86JDg1XoMsb6SNoe%2BF7mKJ4h1A%40mail.gmail.com.
Re: Test Failure in test_terminal3.vim
* Elimar Riesebieter [2020-07-15 08:52 +0200]: > Hi all, > > tried to build 8.2.1216 on amd64 within a tmux session using shadow > dirs and got: > > >From test_terminal3.vim: > Found errors in Test_terminal_getwinpos(): > Run 1: > function > RunTheTest[39]..Test_terminal_getwinpos[16]..WaitForAssert[2]..7_WaitForCommon[11]..58 > line 1: Pattern '\\[\\d\\+, \\d\\+\\]' does not match '[-1, -1]\[ occurs 34 > times]0,0-1 All' > function RunTheTest[39]..Test_terminal_getwinpos line 32: Expected > range 1 - 1142, but got 0 > function RunTheTest[39]..Test_terminal_getwinpos line 33: Expected > range 1 - 419, but got 0 As of 8.2.1287 for some not comprehensible reasons the tests are running fine now. Sorry for the noise- -- You cannot propel yourself forward by patting yourself on the back. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/20200725145539.p543xzlmgnim4rl3%40toy.home.lxtec.de.
Patch 8.2.1292
Patch 8.2.1292 Problem:AIDL filetype not recognized. Solution: Add filetype detection. (Dominique Pellé, closes #6533) Files: runtime/filetype.vim, src/testdir/test_filetype.vim *** ../vim-8.2.1291/runtime/filetype.vim2020-06-26 20:23:40.203927534 +0200 --- runtime/filetype.vim2020-07-25 16:51:17.327063001 +0200 *** *** 88,93 --- 88,96 " AHDL au BufNewFile,BufRead *.tdf setf ahdl + " AIDL + au BufNewFile,BufRead *.aidl setf aidl + " AMPL au BufNewFile,BufRead *.run setf ampl *** ../vim-8.2.1291/src/testdir/test_filetype.vim 2020-06-26 20:23:40.203927534 +0200 --- src/testdir/test_filetype.vim 2020-07-25 16:51:17.327063001 +0200 *** *** 54,59 --- 54,60 \ 'acedb': ['file.wrm'], \ 'ada': ['file.adb', 'file.ads', 'file.ada', 'file.gpr'], \ 'ahdl': ['file.tdf'], + \ 'aidl': ['file.aidl'], \ 'alsaconf': ['.asoundrc', '/usr/share/alsa/alsa.conf', '/etc/asound.conf'], \ 'aml': ['file.aml'], \ 'ampl': ['file.run'], *** ../vim-8.2.1291/src/version.c 2020-07-25 16:32:58.679704392 +0200 --- src/version.c 2020-07-25 16:52:20.318816258 +0200 *** *** 756,757 --- 756,759 { /* Add new patch number below this line */ + /**/ + 1292, /**/ -- If your nose runs, and your feet smell, you might be upside down. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202007251453.06PEruXv334537%40masaka.moolenaar.net.
Patch 8.2.1291
Patch 8.2.1291 Problem:Vim9: type of varargs items is not checked. Solution: Check the list item types. (closes #6523) Files: src/vim9execute.c, src/testdir/test_vim9_func.vim *** ../vim-8.2.1290/src/vim9execute.c 2020-07-22 21:45:10.529629648 +0200 --- src/vim9execute.c 2020-07-25 16:23:09.755074478 +0200 *** *** 755,763 argc -= vararg_count; if (exe_newlist(vararg_count, ) == FAIL) goto failed_early; if (defcount > 0) // Move varargs list to below missing default arguments. ! *STACK_TV_BOT(defcount- 1) = *STACK_TV_BOT(-1); --ectx.ec_stack.ga_len; } --- 755,781 argc -= vararg_count; if (exe_newlist(vararg_count, ) == FAIL) goto failed_early; + + // Check the type of the list items. + tv = STACK_TV_BOT(-1); + if (ufunc->uf_va_type != NULL + && ufunc->uf_va_type->tt_member != _any + && tv->vval.v_list != NULL) + { + type_T *expected = ufunc->uf_va_type->tt_member; + listitem_T *li = tv->vval.v_list->lv_first; + + for (idx = 0; idx < vararg_count; ++idx) + { + if (check_typval_type(expected, >li_tv) == FAIL) + goto failed_early; + li = li->li_next; + } + } + if (defcount > 0) // Move varargs list to below missing default arguments. ! *STACK_TV_BOT(defcount - 1) = *STACK_TV_BOT(-1); --ectx.ec_stack.ga_len; } *** ../vim-8.2.1290/src/testdir/test_vim9_func.vim 2020-07-24 18:47:18.607480118 +0200 --- src/testdir/test_vim9_func.vim 2020-07-25 16:32:05.471964122 +0200 *** *** 164,170 assert_equal('one,foo', MyDefVarargs('one')) assert_equal('one,two', MyDefVarargs('one', 'two')) assert_equal('one,two,three', MyDefVarargs('one', 'two', 'three')) ! call CheckDefFailure(['MyDefVarargs("one", 22)'], 'E1013: argument 2: type mismatch, expected string but got number') enddef let s:value = '' --- 164,218 assert_equal('one,foo', MyDefVarargs('one')) assert_equal('one,two', MyDefVarargs('one', 'two')) assert_equal('one,two,three', MyDefVarargs('one', 'two', 'three')) ! CheckDefFailure(['MyDefVarargs("one", 22)'], ! 'E1013: argument 2: type mismatch, expected string but got number') ! CheckDefFailure(['MyDefVarargs("one", "two", 123)'], ! 'E1013: argument 3: type mismatch, expected string but got number') ! ! let lines =<< trim END ! vim9script ! def Func(...l: list) ! echo l ! enddef ! Func('a', 'b', 'c') ! END ! CheckScriptSuccess(lines) ! ! lines =<< trim END ! vim9script ! def Func(...l: list) ! echo l ! enddef ! Func() ! END ! CheckScriptSuccess(lines) ! ! lines =<< trim END ! vim9script ! def Func(...l: list) ! echo l ! enddef ! Func(1, 2, 3) ! END ! CheckScriptFailure(lines, 'E1013:') ! ! lines =<< trim END ! vim9script ! def Func(...l: list) ! echo l ! enddef ! Func('a', 9) ! END ! CheckScriptFailure(lines, 'E1013:') ! ! lines =<< trim END ! vim9script ! def Func(...l: list) ! echo l ! enddef ! Func(1, 'a') ! END ! CheckScriptFailure(lines, 'E1013:') enddef let s:value = '' *** ../vim-8.2.1290/src/version.c 2020-07-25 15:41:04.412638651 +0200 --- src/version.c 2020-07-25 16:24:07.010681696 +0200 *** *** 756,757 --- 756,759 { /* Add new patch number below this line */ + /**/ + 1291, /**/ -- hundred-and-one symptoms of being an internet addict: 84. Books in your bookcase bear the names Bongo, WinSock and Inside OLE /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202007251434.06PEYVhL329875%40masaka.moolenaar.net.
Patch 8.2.1290
Patch 8.2.1290 Problem:Vim9: cannot replace a global function. Solution: Allow for "!" on a global function. (closes #6524) Also fix that :delfunc on a :def function only made it empty. Files: src/userfunc.c, src/testdir/test_vim9_script.vim *** ../vim-8.2.1289/src/userfunc.c 2020-07-23 17:16:15.050100601 +0200 --- src/userfunc.c 2020-07-25 15:35:28.793642878 +0200 *** *** 1148,1153 --- 1148,1155 func_clear(fp, force); if (force || fp->uf_dfunc_idx == 0) func_free(fp, force); + else + fp->uf_flags |= FC_DEAD; } *** *** 2557,2568 char_u*heredoc_trimmed = NULL; int vim9script = in_vim9script(); - if (vim9script && eap->forceit) - { - emsg(_(e_nobang)); - return NULL; - } - /* * ":function" without argument: list functions. */ --- 2559,2564 *** *** 2732,2737 --- 2728,2740 } p = skipwhite(p + 1); + // In Vim9 script only global functions can be redefined. + if (vim9script && eap->forceit && !is_global) + { + emsg(_(e_nobang)); + goto ret_free; + } + ga_init2(, (int)sizeof(char_u *), 3); if (!eap->skip && name_arg == NULL) *** ../vim-8.2.1289/src/testdir/test_vim9_script.vim2020-07-23 22:41:39.779937421 +0200 --- src/testdir/test_vim9_script.vim2020-07-25 15:39:45.260875958 +0200 *** *** 468,473 --- 468,521 'enddef', 'DoThat()', ], 'E1084:') + + # Check that global :def function can be replaced and deleted + let lines =<< trim END + vim9script + def g:Global(): string + return "yes" + enddef + assert_equal("yes", g:Global()) + def! g:Global(): string + return "no" + enddef + assert_equal("no", g:Global()) + delfunc g:Global + assert_false(exists('*g:Global')) + END + CheckScriptSuccess(lines) + + # Check that global function can be replaced by a :def function and deleted + lines =<< trim END + vim9script + func g:Global() + return "yes" + endfunc + assert_equal("yes", g:Global()) + def! g:Global(): string + return "no" + enddef + assert_equal("no", g:Global()) + delfunc g:Global + assert_false(exists('*g:Global')) + END + CheckScriptSuccess(lines) + + # Check that global :def function can be replaced by a function and deleted + lines =<< trim END + vim9script + def g:Global(): string + return "yes" + enddef + assert_equal("yes", g:Global()) + func! g:Global() + return "no" + endfunc + assert_equal("no", g:Global()) + delfunc g:Global + assert_false(exists('*g:Global')) + END + CheckScriptSuccess(lines) enddef func Test_wrong_type() *** ../vim-8.2.1289/src/version.c 2020-07-25 14:11:50.545128202 +0200 --- src/version.c 2020-07-25 15:19:44.440403795 +0200 *** *** 756,757 --- 756,759 { /* Add new patch number below this line */ + /**/ + 1290, /**/ -- hundred-and-one symptoms of being an internet addict: 83. Batteries in the TV remote now last for months. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202007251341.06PDfeDH318835%40masaka.moolenaar.net.
Patch 8.2.1289
Patch 8.2.1289 Problem:Crash when using a custom completion function. Solution: Initialize all of the expand_T. (closes #6532) Files: src/cmdexpand.c *** ../vim-8.2.1288/src/cmdexpand.c 2020-07-21 21:07:00.716496755 +0200 --- src/cmdexpand.c 2020-07-25 14:09:13.409696136 +0200 *** *** 494,511 void ExpandInit(expand_T *xp) { ! xp->xp_pattern = NULL; ! xp->xp_pattern_len = 0; xp->xp_backslash = XP_BS_NONE; - #ifndef BACKSLASH_IN_FILENAME - xp->xp_shell = FALSE; - #endif xp->xp_numfiles = -1; - xp->xp_files = NULL; - #if defined(FEAT_EVAL) - xp->xp_arg = NULL; - #endif - xp->xp_line = NULL; } /* --- 494,502 void ExpandInit(expand_T *xp) { ! CLEAR_POINTER(xp); xp->xp_backslash = XP_BS_NONE; xp->xp_numfiles = -1; } /* *** *** 2425,2431 # if defined(FEAT_EVAL) /* * Call "user_expand_func()" to invoke a user defined Vim script function and ! * return the result (either a string or a List). */ static void * call_user_expand_func( --- 2416,2422 # if defined(FEAT_EVAL) /* * Call "user_expand_func()" to invoke a user defined Vim script function and ! * return the result (either a string, a List or NULL). */ static void * call_user_expand_func( *** ../vim-8.2.1288/src/version.c 2020-07-24 18:47:18.607480118 +0200 --- src/version.c 2020-07-25 14:10:24.589435921 +0200 *** *** 756,757 --- 756,759 { /* Add new patch number below this line */ + /**/ + 1289, /**/ -- ASCII stupid question, get a stupid ANSI. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ ///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org/// \\\help me help AIDS victims -- http://ICCF-Holland.org/// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202007251212.06PCCdut298149%40masaka.moolenaar.net.