Re: Test failure building 8.2.3104
Elimar Riesebieter wrote: > Environment: > amd64 > tmux > clang-12 > > Failures: > From test_vim9_builtin.vim: > Found errors in Test_remote_foreground(): > command line..script > /source/vim/vim-8.2.3104/src/vim-gtk3/testdir/runtest.vim[473]..function > RunTheTest[44]..Test_remote_foreground line 5: Expected 'E241:' but got > 'E240: No connection to the X server': remote_foreground("NonExistingServer") I can't think of a recent change that could have caused this. Perhaps it's a flaky test failure? -- >From "know your smileys": :q vi user saying, "How do I get out of this damn emacs editor?" /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\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/202107042130.164LU1a62626698%40masaka.moolenaar.net.
Patch 8.2.3107
Patch 8.2.3107 Problem:Vim9: error for arguments while type didn't specify arguments. Solution: Do not update that type to check when no argument count is specified. (closes #8492) Files: src/userfunc.c, src/testdir/test_vim9_assign.vim *** ../vim-8.2.3106/src/userfunc.c 2021-07-04 20:20:48.165400896 +0200 --- src/userfunc.c 2021-07-04 23:28:17.821694166 +0200 *** *** 3148,3154 argvars = argv; argcount = partial->pt_argc + argcount_in; ! if (funcexe->check_type != NULL) { // Now funcexe->check_type is missing the added arguments, make // a copy of the type with the correction. --- 3148,3155 argvars = argv; argcount = partial->pt_argc + argcount_in; ! if (funcexe->check_type != NULL !&& funcexe->check_type->tt_argcount != -1) { // Now funcexe->check_type is missing the added arguments, make // a copy of the type with the correction. *** ../vim-8.2.3106/src/testdir/test_vim9_assign.vim2021-07-04 22:48:08.261371720 +0200 --- src/testdir/test_vim9_assign.vim2021-07-04 23:26:22.225848237 +0200 *** *** 681,686 --- 681,696 assert_equal('done', Partial()) END CheckDefAndScriptSuccess(lines) + + lines =<< trim END + vim9script + def Func(b: bool) + enddef + var Ref: func = function(Func, [true]) + assert_equal('func()', typename(Ref)) + Ref() + END + CheckScriptSuccess(lines) enddef def Test_assignment_list_any_index() *** ../vim-8.2.3106/src/version.c 2021-07-04 22:48:08.261371720 +0200 --- src/version.c 2021-07-04 23:24:16.770067985 +0200 *** *** 757,758 --- 757,760 { /* Add new patch number below this line */ + /**/ + 3107, /**/ -- The sooner you fall behind, the more time you'll have to catch up. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\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/202107042130.164LU2RM2626704%40masaka.moolenaar.net.
Patch 8.2.3106
Patch 8.2.3106 Problem:Vim9: confusing line number reported for error. Solution: Use the start line number for the store instruction. (closes #8488) Files: src/vim9compile.c, src/testdir/test_vim9_assign.vim *** ../vim-8.2.3105/src/vim9compile.c 2021-07-03 18:56:49.917634884 +0200 --- src/vim9compile.c 2021-07-04 22:46:09.797594248 +0200 *** *** 6726,6732 var_start = arg; for (var_idx = 0; var_idx == 0 || var_idx < var_count; var_idx++) { ! int instr_count = -1; if (var_start[0] == '_' && !eval_isnamec(var_start[1])) { --- 6726,6733 var_start = arg; for (var_idx = 0; var_idx == 0 || var_idx < var_count; var_idx++) { ! int instr_count = -1; ! int save_lnum; if (var_start[0] == '_' && !eval_isnamec(var_start[1])) { *** *** 6979,6991 --- 6980,6999 goto theend; } + // Use the line number of the assignment for store instruction. + save_lnum = cctx->ctx_lnum; + cctx->ctx_lnum = start_lnum - 1; + if (lhs.lhs_has_index) { // Use the info in "lhs" to store the value at the index in the // list or dict. if (compile_assign_unlet(var_start, , TRUE, rhs_type, cctx) == FAIL) + { + cctx->ctx_lnum = save_lnum; goto theend; + } } else { *** *** 7006,7013 --- 7014,7025 generate_SETTYPE(cctx, lhs.lhs_type); if (generate_store_lhs(cctx, , instr_count) == FAIL) + { + cctx->ctx_lnum = save_lnum; goto theend; + } } + cctx->ctx_lnum = save_lnum; if (var_idx + 1 < var_count) var_start = skipwhite(lhs.lhs_dest_end + 1); *** ../vim-8.2.3105/src/testdir/test_vim9_assign.vim2021-07-04 20:20:48.165400896 +0200 --- src/testdir/test_vim9_assign.vim2021-07-04 22:45:36.905655773 +0200 *** *** 388,393 --- 388,403 ->copy() END CheckDefFailure(lines, 'E1012:', 2) + + lines =<< trim END + var x: any + x.key = 1 + + 2 + + 3 + + 4 + + 5 + END + CheckDefExecAndScriptFailure2(lines, 'E1148:', 'E1203:', 2) enddef def Test_assign_index() *** ../vim-8.2.3105/src/version.c 2021-07-04 20:20:48.165400896 +0200 --- src/version.c 2021-07-04 22:39:19.026352782 +0200 *** *** 757,758 --- 757,760 { /* Add new patch number below this line */ + /**/ + 3106, /**/ -- Where do you want to crash today? /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\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/202107042048.164KmcEp2616982%40masaka.moolenaar.net.
Patch 8.2.3105
Patch 8.2.3105 Problem:Vim9: type of partial is wrong when it has arguments. Solution: Subtract arguments from the count. (issue #8492) Files: src/vim9type.c, src/userfunc.c, src/testdir/test_vim9_assign.vim *** ../vim-8.2.3104/src/vim9type.c 2021-07-04 18:28:09.779780571 +0200 --- src/vim9type.c 2021-07-04 20:00:21.288051881 +0200 *** *** 355,361 --- 355,374 if (ufunc->uf_func_type == NULL) set_function_type(ufunc); if (ufunc->uf_func_type != NULL) + { + if (tv->v_type == VAR_PARTIAL + && tv->vval.v_partial->pt_argc > 0) + { + type = get_type_ptr(type_gap); + if (type == NULL) + return NULL; + *type = *ufunc->uf_func_type; + type->tt_argcount -= tv->vval.v_partial->pt_argc; + type->tt_min_argcount -= tv->vval.v_partial->pt_argc; + return type; + } return ufunc->uf_func_type; + } } } *** ../vim-8.2.3104/src/userfunc.c 2021-07-03 16:33:12.513916467 +0200 --- src/userfunc.c 2021-07-04 20:14:23.230230089 +0200 *** *** 3103,3108 --- 3103,3109 int argv_clear = 0; int argv_base = 0; partial_T *partial = funcexe->partial; + type_Tcheck_type; // Initialize rettv so that it is safe for caller to invoke clear_tv(rettv) // even when call_func() returns FAIL. *** *** 3146,3151 --- 3147,3162 argv[i + argv_clear] = argvars_in[i]; argvars = argv; argcount = partial->pt_argc + argcount_in; + + if (funcexe->check_type != NULL) + { + // Now funcexe->check_type is missing the added arguments, make + // a copy of the type with the correction. + check_type = *funcexe->check_type; + funcexe->check_type = _type; + check_type.tt_argcount += partial->pt_argc; + check_type.tt_min_argcount += partial->pt_argc; + } } } *** ../vim-8.2.3104/src/testdir/test_vim9_assign.vim2021-07-04 18:28:09.779780571 +0200 --- src/testdir/test_vim9_assign.vim2021-07-04 20:17:11.041868449 +0200 *** *** 661,673 CheckDefExecAndScriptFailure(lines, 'E1012:', 5) enddef ! def PartFunc(b: bool): string return 'done' enddef def Test_assignment_partial() ! var Partial: func(): string = function(PartFunc, [true]) ! assert_equal('done', Partial()) enddef def Test_assignment_list_any_index() --- 661,676 CheckDefExecAndScriptFailure(lines, 'E1012:', 5) enddef ! def PartFuncBool(b: bool): string return 'done' enddef def Test_assignment_partial() ! var lines =<< trim END ! var Partial: func(): string = function(PartFuncBool, [true]) ! assert_equal('done', Partial()) ! END ! CheckDefAndScriptSuccess(lines) enddef def Test_assignment_list_any_index() *** ../vim-8.2.3104/src/version.c 2021-07-04 18:28:09.779780571 +0200 --- src/version.c 2021-07-04 20:01:39.147882528 +0200 *** *** 757,758 --- 757,760 { /* Add new patch number below this line */ + /**/ + 3105, /**/ -- >From "know your smileys": |-PReaction to unusually ugly C code /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\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/202107041826.164IQ7d32589187%40masaka.moolenaar.net.
Test failure building 8.2.3104
Hi all, Environment: amd64 tmux clang-12 Failures: From test_vim9_builtin.vim: Found errors in Test_remote_foreground(): command line..script /source/vim/vim-8.2.3104/src/vim-gtk3/testdir/runtest.vim[473]..function RunTheTest[44]..Test_remote_foreground line 5: Expected 'E241:' but got 'E240: No connection to the X server': remote_foreground("NonExistingServer") Thanks Elimar -- Experience is something you don't get until just after you need it! -- -- 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/20210704173941.dvtc6nzjscaa63ve%40toy.home.lxtec.de.
Patch 8.2.3104
Patch 8.2.3104 Problem:Vim9: unspecified function type causes type error. Solution: Don't check type when min_argcount is negative. (issue #8492) Files: src/globals.h, src/vim9type.c, src/testdir/test_vim9_assign.vim *** ../vim-8.2.3103/src/globals.h 2021-06-27 22:03:28.637707737 +0200 --- src/globals.h 2021-07-04 18:13:28.776992425 +0200 *** *** 421,427 // Special value used for @#. EXTERN type_T t_number_or_string INIT6(VAR_STRING, 0, 0, TTFLAG_STATIC, NULL, NULL); ! EXTERN type_T t_func_unknown INIT6(VAR_FUNC, -1, 0, TTFLAG_STATIC, _unknown, NULL); EXTERN type_T t_func_void INIT6(VAR_FUNC, -1, 0, TTFLAG_STATIC, _void, NULL); EXTERN type_T t_func_any INIT6(VAR_FUNC, -1, 0, TTFLAG_STATIC, _any, NULL); EXTERN type_T t_func_number INIT6(VAR_FUNC, -1, 0, TTFLAG_STATIC, _number, NULL); --- 421,427 // Special value used for @#. EXTERN type_T t_number_or_string INIT6(VAR_STRING, 0, 0, TTFLAG_STATIC, NULL, NULL); ! EXTERN type_T t_func_unknown INIT6(VAR_FUNC, -1, -1, TTFLAG_STATIC, _unknown, NULL); EXTERN type_T t_func_void INIT6(VAR_FUNC, -1, 0, TTFLAG_STATIC, _void, NULL); EXTERN type_T t_func_any INIT6(VAR_FUNC, -1, 0, TTFLAG_STATIC, _any, NULL); EXTERN type_T t_func_number INIT6(VAR_FUNC, -1, 0, TTFLAG_STATIC, _number, NULL); *** ../vim-8.2.3103/src/vim9type.c 2021-07-04 15:54:04.935754560 +0200 --- src/vim9type.c 2021-07-04 18:20:18.168216771 +0200 *** *** 526,531 --- 526,532 ret = check_type(expected->tt_member, actual->tt_member, FALSE, where); if (ret == OK && expected->tt_argcount != -1 + && actual->tt_min_argcount != -1 && (actual->tt_argcount == -1 || (actual->tt_argcount < expected->tt_min_argcount || actual->tt_argcount > expected->tt_argcount))) *** ../vim-8.2.3103/src/testdir/test_vim9_assign.vim2021-07-04 15:54:04.939754549 +0200 --- src/testdir/test_vim9_assign.vim2021-07-04 18:24:44.648022448 +0200 *** *** 661,666 --- 661,675 CheckDefExecAndScriptFailure(lines, 'E1012:', 5) enddef + def PartFunc(b: bool): string + return 'done' + enddef + + def Test_assignment_partial() + var Partial: func(): string = function(PartFunc, [true]) + assert_equal('done', Partial()) + enddef + def Test_assignment_list_any_index() var l: list = [1, 2] for [x, y, _] *** ../vim-8.2.3103/src/version.c 2021-07-04 17:36:50.377399435 +0200 --- src/version.c 2021-07-04 18:28:01.391791616 +0200 *** *** 757,758 --- 757,760 { /* Add new patch number below this line */ + /**/ + 3104, /**/ -- In order for something to become clean, something else must become dirty; but you can get everything dirty without getting anything clean. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\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/202107041630.164GUCeI2566627%40masaka.moolenaar.net.
Patch 8.2.3103
Patch 8.2.3103 (after 8.2.3102) Problem:Swap test may fail on some systems when jobs take longer to exit. Solution: Use different file names. Files: src/testdir/test_swap.vim *** ../vim-8.2.3102/src/testdir/test_swap.vim 2021-07-04 17:23:04.391297949 +0200 --- src/testdir/test_swap.vim 2021-07-04 17:34:14.469753848 +0200 *** *** 502,519 " Test for renaming a buffer when the swap file is deleted out-of-band func Test_missing_swap_file() CheckUnix ! new Xfile1 call delete(swapname('')) ! call assert_fails('file Xfile2', 'E301:') ! call assert_equal('Xfile2', bufname()) ! call assert_true(bufexists('Xfile1')) call assert_true(bufexists('Xfile2')) %bw! endfunc " Test for :preserve command func Test_preserve() ! new Xfile1 setlocal noswapfile call assert_fails('preserve', 'E313:') bw! --- 502,519 " Test for renaming a buffer when the swap file is deleted out-of-band func Test_missing_swap_file() CheckUnix ! new Xfile2 call delete(swapname('')) ! call assert_fails('file Xfile3', 'E301:') ! call assert_equal('Xfile3', bufname()) call assert_true(bufexists('Xfile2')) + call assert_true(bufexists('Xfile3')) %bw! endfunc " Test for :preserve command func Test_preserve() ! new Xfile4 setlocal noswapfile call assert_fails('preserve', 'E313:') bw! *** *** 521,528 " Test for the v:swapchoice variable func Test_swapchoice() ! call writefile(['aaa', 'bbb'], 'Xfile1') ! edit Xfile1 preserve let swapfname = swapname('') let b = readblob(swapfname) --- 521,528 " Test for the v:swapchoice variable func Test_swapchoice() ! call writefile(['aaa', 'bbb'], 'Xfile5') ! edit Xfile5 preserve let swapfname = swapname('') let b = readblob(swapfname) *** *** 536,542 autocmd! autocmd SwapExists * let v:swapchoice = 'o' augroup END ! edit Xfile1 call assert_true() call assert_equal(['aaa', 'bbb'], getline(1, '$')) %bw! --- 536,542 autocmd! autocmd SwapExists * let v:swapchoice = 'o' augroup END ! edit Xfile5 call assert_true() call assert_equal(['aaa', 'bbb'], getline(1, '$')) %bw! *** *** 548,558 autocmd SwapExists * let v:swapchoice = 'a' augroup END try ! edit Xfile1 catch /^Vim:Interrupt$/ endtry call assert_equal('', @%) ! call assert_true(bufexists('Xfile1')) %bw! call assert_true(filereadable(swapfname)) --- 548,558 autocmd SwapExists * let v:swapchoice = 'a' augroup END try ! edit Xfile5 catch /^Vim:Interrupt$/ endtry call assert_equal('', @%) ! call assert_true(bufexists('Xfile5')) %bw! call assert_true(filereadable(swapfname)) *** *** 561,572 autocmd! autocmd SwapExists * let v:swapchoice = 'd' augroup END ! edit Xfile1 ! call assert_equal('Xfile1', @%) %bw! call assert_false(filereadable(swapfname)) ! call delete('Xfile1') call delete(swapfname) augroup test_swapchoice autocmd! --- 561,572 autocmd! autocmd SwapExists * let v:swapchoice = 'd' augroup END ! edit Xfile5 ! call assert_equal('Xfile5', @%) %bw! call assert_false(filereadable(swapfname)) ! call delete('Xfile5') call delete(swapfname) augroup test_swapchoice autocmd! *** ../vim-8.2.3102/src/version.c 2021-07-04 17:23:04.391297949 +0200 --- src/version.c 2021-07-04 17:36:29.825446099 +0200 *** *** 757,758 --- 757,760 { /* Add new patch number below this line */ + /**/ + 3103, /**/ -- How many light bulbs does it take to change a person? /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\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/202107041537.164FbWuQ2555615%40masaka.moolenaar.net.
Patch 8.2.3102
Patch 8.2.3102 (after 8.2.3097) Problem:Test for crash fix does not fail without the fix. Solution: Adjust the test sequence. (closes #8506) Files: src/testdir/test_swap.vim *** ../vim-8.2.3101/src/testdir/test_swap.vim 2021-07-04 13:27:05.968932388 +0200 --- src/testdir/test_swap.vim 2021-07-04 17:14:49.952490713 +0200 *** *** 373,390 call WaitForAssert({-> assert_match('^1$', term_getline(buf, 20))}) call StopVimInTerminal(buf) ! " This caused Vim to crash when typing "q". ! " TODO: it does not actually reproduce the crash. ! call writefile(['au BufAdd * set virtualedit=all'], 'Xvimrc') ! ! let buf = RunVimInTerminal('-u Xvimrc Xfile1', {'rows': 20, 'wait_for_ruler': 0}) ! call TermWait(buf) ! call WaitForAssert({-> assert_match('^\[O\]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:', term_getline(buf, 20))}) call term_sendkeys(buf, "q") %bwipe! call delete('Xfile1') - call delete('Xvimrc') endfunc func Test_swap_symlink() --- 373,394 call WaitForAssert({-> assert_match('^1$', term_getline(buf, 20))}) call StopVimInTerminal(buf) ! " This caused Vim to crash when typing "q" at the swap file prompt. ! let buf = RunVimInTerminal('-c "au bufadd * let foo_w = wincol()"', {'rows': 18}) ! call term_sendkeys(buf, ":e Xfile1\") ! call WaitForAssert({-> assert_match('More', term_getline(buf, 18))}) ! call term_sendkeys(buf, " ") ! call WaitForAssert({-> assert_match('^\[O\]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:', term_getline(buf, 18))}) call term_sendkeys(buf, "q") + call TermWait(buf) + " check that Vim is still running + call term_sendkeys(buf, ":echo 'hello'\") + call WaitForAssert({-> assert_match('^hello', term_getline(buf, 18))}) + call term_sendkeys(buf, ":%bwipe!\") + call StopVimInTerminal(buf) %bwipe! call delete('Xfile1') endfunc func Test_swap_symlink() *** ../vim-8.2.3101/src/version.c 2021-07-04 17:19:32.371800400 +0200 --- src/version.c 2021-07-04 17:22:42.103350299 +0200 *** *** 757,758 --- 757,760 { /* Add new patch number below this line */ + /**/ + 3102, /**/ -- >From "know your smileys": :-O>-o Smiley American tourist (note big mouth and camera) /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\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/202107041529.164FTwiF2553936%40masaka.moolenaar.net.
Re: Patch 8.2.3101
I wrote: > Patch 8.2.3101 > Problem:Missing function prototype for vim_round(). > Solution: Add the prototype. > Files: src/proto/float.pro Missed the update to version.c: *** ../vim-8.2.3101/src/version.c 2021-07-04 15:54:04.939754549 +0200 --- src/version.c 2021-07-04 16:49:47.827925942 +0200 *** *** 757,758 --- 757,760 { /* Add new patch number below this line */ + /**/ + 3101, /**/ -- >From "know your smileys": O:-) Saint /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\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/202107041521.164FLvBZ2552294%40masaka.moolenaar.net.
Patch 8.2.3101
Patch 8.2.3101 Problem:Missing function prototype for vim_round(). Solution: Add the prototype. Files: src/proto/float.pro *** ../vim-8.2.3100/src/proto/float.pro 2021-06-02 17:07:02.280398156 +0200 --- src/proto/float.pro 2021-07-04 16:49:14.120003673 +0200 *** *** 1,4 ! /* math.c */ int string2float(char_u *text, float_T *value); void f_abs(typval_T *argvars, typval_T *rettv); void f_acos(typval_T *argvars, typval_T *rettv); --- 1,4 ! /* float.c */ int string2float(char_u *text, float_T *value); void f_abs(typval_T *argvars, typval_T *rettv); void f_acos(typval_T *argvars, typval_T *rettv); *** *** 17,22 --- 17,23 void f_log(typval_T *argvars, typval_T *rettv); void f_log10(typval_T *argvars, typval_T *rettv); void f_pow(typval_T *argvars, typval_T *rettv); + float_T vim_round(float_T f); void f_round(typval_T *argvars, typval_T *rettv); void f_sin(typval_T *argvars, typval_T *rettv); void f_sinh(typval_T *argvars, typval_T *rettv); -- >From "know your smileys": ~#:-( I just washed my hair, and I can't do nuthin' with it. /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\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/202107041451.164EpbTv2545986%40masaka.moolenaar.net.
Patch 8.2.3100
Patch 8.2.3100 Problem:Vim9: no error when using type with unknown number of arguments. Solution: Do not ignore argument count of -1. (closes #8492) Files: src/vim9type.c, src/evalfunc.c, src/proto/evalfunc.pro, src/testdir/test_vim9_assign.vim, src/testdir/test_vim9_expr.vim, src/testdir/test_vim9_func.vim *** ../vim-8.2.3099/src/vim9type.c 2021-06-22 19:32:13.356374012 +0200 --- src/vim9type.c 2021-07-04 15:45:21.840794416 +0200 *** *** 260,265 --- 260,266 type_T *type; type_T *member_type = _any; int argcount = 0; + int min_argcount = 0; if (tv->v_type == VAR_NUMBER) return _number; *** *** 337,344 if (idx >= 0) { ! // TODO: get actual arg count and types ! argcount = -1; member_type = internal_func_ret_type(idx, 0, NULL); } else --- 338,344 if (idx >= 0) { ! internal_func_get_argcount(idx, , _argcount); member_type = internal_func_ret_type(idx, 0, NULL); } else *** *** 364,369 --- 364,370 return NULL; type->tt_type = tv->v_type; type->tt_argcount = argcount; + type->tt_min_argcount = min_argcount; type->tt_member = member_type; return type; *** *** 525,533 ret = check_type(expected->tt_member, actual->tt_member, FALSE, where); if (ret == OK && expected->tt_argcount != -1 ! && actual->tt_argcount != -1 ! && (actual->tt_argcount < expected->tt_min_argcount ! || actual->tt_argcount > expected->tt_argcount)) ret = FAIL; if (ret == OK && expected->tt_args != NULL && actual->tt_args != NULL) --- 526,534 ret = check_type(expected->tt_member, actual->tt_member, FALSE, where); if (ret == OK && expected->tt_argcount != -1 ! && (actual->tt_argcount == -1 ! || (actual->tt_argcount < expected->tt_min_argcount ! || actual->tt_argcount > expected->tt_argcount))) ret = FAIL; if (ret == OK && expected->tt_args != NULL && actual->tt_args != NULL) *** *** 1032,1038 --- 1033,1042 } } else + // Use -1 for "tt_argcount" to indicate an unknown number of + // arguments. *dest = alloc_func_type(common, -1, type_gap); + // Use the minimum of min_argcount. (*dest)->tt_min_argcount = type1->tt_min_argcount < type2->tt_min_argcount *** ../vim-8.2.3099/src/evalfunc.c 2021-07-03 11:58:08.373825923 +0200 --- src/evalfunc.c 2021-07-04 15:45:23.344791416 +0200 *** *** 2055,2060 --- 2055,2072 } /* + * Get the argument count for function "idx". + * "argcount" is the total argument count, "min_argcount" the non-optional + * argument count. + */ + void + internal_func_get_argcount(int idx, int *argcount, int *min_argcount) + { + *argcount = global_functions[idx].f_max_argc; + *min_argcount = global_functions[idx].f_min_argc; + } + + /* * Call the "f_retfunc" function to obtain the return type of function "idx". * "argtypes" is the list of argument types or NULL when there are no * arguments. *** ../vim-8.2.3099/src/proto/evalfunc.pro 2021-06-02 14:56:35.823997065 +0200 --- src/proto/evalfunc.pro 2021-07-04 15:45:26.492785122 +0200 *** *** 6,11 --- 6,12 int has_internal_func(char_u *name); char *internal_func_name(int idx); int internal_func_check_arg_types(type_T **types, int idx, int argcount, cctx_T *cctx); + void internal_func_get_argcount(int idx, int *argcount, int *min_argcount); type_T *internal_func_ret_type(int idx, int argcount, type_T **argtypes); int internal_func_is_map(int idx); int check_internal_func(int idx, int argcount); *** *** 21,27 int dynamic_feature(char_u *feature); void mzscheme_call_vim(char_u *name, typval_T *args, typval_T *rettv); void range_list_materialize(list_T *list); - float_T vim_round(float_T f); long do_searchpair(char_u *spat, char_u *mpat, char_u *epat, int dir, typval_T *skip, int flags, pos_T *match_pos, linenr_T lnum_stop, long time_limit); void f_string(typval_T *argvars, typval_T *rettv); /* vim: set ft=c : */ --- 22,27 *** ../vim-8.2.3099/src/testdir/test_vim9_assign.vim2021-06-27 15:04:00.784722722 +0200 ---
Patch 8.2.3099
Patch 8.2.3099 Problem:Vim9: missing catch/finally not reported at script level. Solution: Give an error. (closes #8487) Files: src/structs.h, src/ex_eval.c, src/testdir/test_vim9_script.vim *** ../vim-8.2.3098/src/structs.h 2021-07-03 18:56:49.917634884 +0200 --- src/structs.h 2021-07-04 14:25:52.534221303 +0200 *** *** 936,948 # define CSF_TRY 0x0100 // is a ":try" # define CSF_FINALLY 0x0200 // ":finally" has been passed ! # define CSF_THROWN 0x0400 // exception thrown to this try conditional ! # define CSF_CAUGHT 0x0800 // exception caught by this try conditional ! # define CSF_SILENT 0x1000 // "emsg_silent" reset by ":try" // Note that CSF_ELSE is only used when CSF_TRY and CSF_WHILE are unset // (an ":if"), and CSF_SILENT is only used when CSF_TRY is set. // ! #define CSF_FUNC_DEF 0x2000 // a function was defined in this block /* * What's pending for being reactivated at the ":endtry" of this try --- 936,949 # define CSF_TRY 0x0100 // is a ":try" # define CSF_FINALLY 0x0200 // ":finally" has been passed ! # define CSF_CATCH0x0400 // ":catch" has been seen ! # define CSF_THROWN 0x0800 // exception thrown to this try conditional ! # define CSF_CAUGHT 0x1000 // exception caught by this try conditional ! # define CSF_SILENT 0x2000 // "emsg_silent" reset by ":try" // Note that CSF_ELSE is only used when CSF_TRY and CSF_WHILE are unset // (an ":if"), and CSF_SILENT is only used when CSF_TRY is set. // ! #define CSF_FUNC_DEF 0x4000 // a function was defined in this block /* * What's pending for being reactivated at the ":endtry" of this try *** ../vim-8.2.3098/src/ex_eval.c 2021-04-05 22:27:33.402532604 +0200 --- src/ex_eval.c 2021-07-04 14:38:21.148335043 +0200 *** *** 1670,1675 --- 1670,1677 for (idx = cstack->cs_idx; idx > 0; --idx) if (cstack->cs_flags[idx] & CSF_TRY) break; + if (cstack->cs_flags[idx] & CSF_TRY) + cstack->cs_flags[idx] |= CSF_CATCH; if (cstack->cs_flags[idx] & CSF_FINALLY) { // Give up for a ":catch" after ":finally" and ignore it. *** *** 1963,1970 * made inactive by a ":continue", ":break", ":return", or ":finish" in * the finally clause. The latter case need not be tested since then * anything pending has already been discarded. */ ! skip = did_emsg || got_int || did_throw || ! !(cstack->cs_flags[cstack->cs_idx] & CSF_TRUE); if (!(cstack->cs_flags[cstack->cs_idx] & CSF_TRY)) { --- 1965,1972 * made inactive by a ":continue", ":break", ":return", or ":finish" in * the finally clause. The latter case need not be tested since then * anything pending has already been discarded. */ ! skip = did_emsg || got_int || did_throw !|| !(cstack->cs_flags[cstack->cs_idx] & CSF_TRUE); if (!(cstack->cs_flags[cstack->cs_idx] & CSF_TRY)) { *** *** 1992,1997 --- 1994,2007 { idx = cstack->cs_idx; + if (in_vim9script() +&& (cstack->cs_flags[idx] & (CSF_CATCH|CSF_FINALLY)) == 0) + { + // try/endtry without any catch or finally: give an error and + // continue. + eap->errmsg = _(e_missing_catch_or_finally); + } + /* * If we stopped with the exception currently being thrown at this * try conditional since we didn't know that it doesn't have *** ../vim-8.2.3098/src/testdir/test_vim9_script.vim2021-06-30 20:39:11.366130953 +0200 --- src/testdir/test_vim9_script.vim2021-07-04 14:39:33.584169610 +0200 *** *** 603,608 --- 603,617 CheckScriptSuccess(lines) assert_match('E808: Number or Float required', g:caught) unlet g:caught + + # missing catch and/or finally + lines =<< trim END + vim9script + try + echo 'something' + endtry + END + CheckScriptFailure(lines, 'E1032:') enddef def Test_try_in_catch() *** ../vim-8.2.3098/src/version.c 2021-07-04 14:00:52.133474925 +0200 --- src/version.c 2021-07-04 14:44:40.083484923 +0200 *** *** 757,758 --- 757,760 { /* Add new patch number below this line */ + /**/ + 3099, /**/ -- >From "know your smileys": :-)Funny |-)Funny Oriental (-:Funny Australian /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\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
Patch 8.2.3098
Patch 8.2.3098 Problem:Popup window test is flaky on MS-Windows with GUI. Solution: Skip the check in this situation. Files: src/testdir/test_popupwin.vim *** ../vim-8.2.3097/src/testdir/test_popupwin.vim 2021-07-03 21:41:35.121946816 +0200 --- src/testdir/test_popupwin.vim 2021-07-04 13:59:01.033683347 +0200 *** *** 1550,1573 redraw " e is consumed by the filter call feedkeys('e', 'xt') call assert_equal('e', g:eaten) call feedkeys("\", 'xt') call assert_equal("\", g:eaten) " 0 is ignored by the filter normal $ call assert_equal(9, getcurpos()[2]) call feedkeys('0', 'xt') call assert_equal('0', g:ignored) ! normal! l ! call assert_equal(2, getcurpos()[2]) " x closes the popup call feedkeys('x', 'xt') call assert_equal("\", g:eaten) call assert_equal(-1, winbufnr(winid)) delfunc MyPopupFilter call popup_clear() endfunc --- 1550,1581 redraw " e is consumed by the filter + let g:eaten = '' call feedkeys('e', 'xt') call assert_equal('e', g:eaten) call feedkeys("\", 'xt') call assert_equal("\", g:eaten) " 0 is ignored by the filter + let g:ignored = '' normal $ call assert_equal(9, getcurpos()[2]) call feedkeys('0', 'xt') call assert_equal('0', g:ignored) ! ! if has('win32') && has('gui_running') ! echo "FIXME: this check is very flaky on MS-Windows GUI, the cursor doesn't move" ! else ! call assert_equal(1, getcurpos()[2]) ! endif " x closes the popup call feedkeys('x', 'xt') call assert_equal("\", g:eaten) call assert_equal(-1, winbufnr(winid)) + unlet g:eaten + unlet g:ignored delfunc MyPopupFilter call popup_clear() endfunc *** ../vim-8.2.3097/src/version.c 2021-07-04 13:27:05.968932388 +0200 --- src/version.c 2021-07-04 14:00:30.637515261 +0200 *** *** 757,758 --- 757,760 { /* Add new patch number below this line */ + /**/ + 3098, /**/ -- >From "know your smileys": ;-0Can't find shift key ,-9Kann Umschalttaste nicht finden /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\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/202107041201.164C1gHl2506912%40masaka.moolenaar.net.
Patch 8.2.3097
Patch 8.2.3097 Problem:Crash when using "quit" at recovery prompt and autocommands are triggered. Solution: Block autocommands when creating an empty buffer to use as the current buffer. (closes #8506) Files: src/buffer.c, src/testdir/test_swap.vim *** ../vim-8.2.3096/src/buffer.c2021-06-27 22:03:28.637707737 +0200 --- src/buffer.c2021-07-04 13:12:00.844832388 +0200 *** *** 1130,1136 --- 1130,1141 close_buffer(curwin, curbuf, DOBUF_UNLOAD, FALSE, FALSE); if (old_curbuf == NULL || !bufref_valid(old_curbuf) || old_curbuf->br_buf == curbuf) + { + // Block autocommands here because curwin->w_buffer is NULL. + block_autocmds(); buf = buflist_new(NULL, NULL, 1L, BLN_CURBUF | BLN_LISTED); + unblock_autocmds(); + } else buf = old_curbuf->br_buf; if (buf != NULL) *** ../vim-8.2.3096/src/testdir/test_swap.vim 2021-06-23 21:44:03.249880242 +0200 --- src/testdir/test_swap.vim 2021-07-04 13:13:53.657012734 +0200 *** *** 360,365 --- 360,366 let buf = RunVimInTerminal('', {'rows': 20}) call term_sendkeys(buf, ":set nomore\n") call term_sendkeys(buf, ":set noruler\n") + call term_sendkeys(buf, ":split Xfile1\n") call TermWait(buf) call WaitForAssert({-> assert_match('^\[O\]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort: $', term_getline(buf, 20))}) *** *** 371,378 --- 372,390 call TermWait(buf) call WaitForAssert({-> assert_match('^1$', term_getline(buf, 20))}) call StopVimInTerminal(buf) + + " This caused Vim to crash when typing "q". + " TODO: it does not actually reproduce the crash. + call writefile(['au BufAdd * set virtualedit=all'], 'Xvimrc') + + let buf = RunVimInTerminal('-u Xvimrc Xfile1', {'rows': 20, 'wait_for_ruler': 0}) + call TermWait(buf) + call WaitForAssert({-> assert_match('^\[O\]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:', term_getline(buf, 20))}) + call term_sendkeys(buf, "q") + %bwipe! call delete('Xfile1') + call delete('Xvimrc') endfunc func Test_swap_symlink() *** ../vim-8.2.3096/src/version.c 2021-07-04 12:30:00.215304320 +0200 --- src/version.c 2021-07-04 13:16:22.753186086 +0200 *** *** 757,758 --- 757,760 { /* Add new patch number below this line */ + /**/ + 3097, /**/ -- >From "know your smileys": ¯\_(ツ)_/¯ Shrug /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\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/202107041128.164BS2jr2499342%40masaka.moolenaar.net.
Patch 8.2.3096
Patch 8.2.3096 Problem:Temp files remain after running tests. Solution: Delete the right files. (Dominique Pellé, closes #8509) Files: src/testdir/test_debugger.vim, src/testdir/test_lambda.vim, src/testdir/test_visual.vim *** ../vim-8.2.3095/src/testdir/test_debugger.vim 2021-07-03 13:36:27.871600408 +0200 --- src/testdir/test_debugger.vim 2021-07-04 12:26:55.975781110 +0200 *** *** 975,982 call RunDbgCmd(buf, 'cont') call StopVimInTerminal(buf) ! call delete('Xtest1.vim') ! call delete('Xtest2.vim') endfunc func Test_debug_def_function() --- 975,981 call RunDbgCmd(buf, 'cont') call StopVimInTerminal(buf) ! call delete('XtestDebug.vim') endfunc func Test_debug_def_function() *** ../vim-8.2.3095/src/testdir/test_lambda.vim 2020-12-06 15:03:14.821379868 +0100 --- src/testdir/test_lambda.vim 2021-07-04 12:26:55.975781110 +0200 *** *** 330,335 --- 330,336 let caught_932 = 1 endtry call assert_equal(1, caught_932) + call delete('Xscript') endfunc " vim: shiftwidth=2 sts=2 expandtab *** ../vim-8.2.3095/src/testdir/test_visual.vim 2021-07-03 22:14:57.886777493 +0200 --- src/testdir/test_visual.vim 2021-07-04 12:26:55.975781110 +0200 *** *** 1262,1268 " clean up call term_sendkeys(buf, "\") call StopVimInTerminal(buf) ! call delete('XTest_beval') endfunc --- 1262,1268 " clean up call term_sendkeys(buf, "\") call StopVimInTerminal(buf) ! call delete('XTest_block') endfunc *** ../vim-8.2.3095/src/version.c 2021-07-03 22:14:57.886777493 +0200 --- src/version.c 2021-07-04 12:29:53.887320671 +0200 *** *** 757,758 --- 757,760 { /* Add new patch number below this line */ + /**/ + 3096, /**/ -- >From "know your smileys": y:-) Bad toupee /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\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/202107041041.164Afjds2490169%40masaka.moolenaar.net.