Patch 8.2.2398
Patch 8.2.2398 (after 8.2.2396) Problem:Method test fails. Solution: Adjust test for allowed white space. Files: src/testdir/test_method.vim *** ../vim-8.2.2397/src/testdir/test_method.vim 2020-07-11 22:14:54.314422214 +0200 --- src/testdir/test_method.vim 2021-01-23 15:26:45.214302695 +0100 *** *** 131,139 eval [1, 2, 3] \ ->sort( \ ) ! call assert_fails('eval [1, 2, 3]-> sort()', 'E15:') call assert_fails('eval [1, 2, 3]->sort ()', 'E274:') ! call assert_fails('eval [1, 2, 3]-> sort ()', 'E15:') endfunc func Test_method_lambda() --- 131,141 eval [1, 2, 3] \ ->sort( \ ) ! eval [1, 2, 3]-> sort() ! call assert_fails('eval [1, 2, 3]->sort ()', 'E274:') ! call assert_fails('eval [1, 2, 3] ->sort ()', 'E274:') ! call assert_fails('eval [1, 2, 3]-> sort ()', 'E274:') endfunc func Test_method_lambda() *** ../vim-8.2.2397/src/version.c 2021-01-23 15:14:57.312269438 +0100 --- src/version.c 2021-01-23 15:26:06.886406468 +0100 *** *** 752,753 --- 752,755 { /* Add new patch number below this line */ + /**/ + 2398, /**/ -- Don't be humble ... you're not that great. -- Golda Meir /// 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/202101231427.10NERfSj2504323%40masaka.moolenaar.net.
Re: Test failure building 8.2.2395
Elimar Riesebieter wrote: > building 8.2.2395 I get: > > From test_fold.vim: > Found errors in Test_fold_relative_move(): > command line..script > /source/vim/vim-8.2.2395/src/vim-gtk3/testdir/runtest.vim[468]..function > RunTheTest[39]..Test_fold_relative_move line 25: Expected 3 but got 2 > command line..script > /source/vim/vim-8.2.2395/src/vim-gtk3/testdir/runtest.vim[468]..function > RunTheTest[39]..Test_fold_relative_move line 30: Expected 2 but got 1 > > Building within tmux. Using clang-11 as compiler. Platform -> Linux amd64 I cannot reproduce it. Does valgrind say anything? -- A scientist is someone who knows exactly how an engine works, but can't fix his car when it fails to start. An engineer is someone who knows only some things about an engine, but can fix his car when it's broken. /// 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/202101231415.10NEFii52500101%40masaka.moolenaar.net.
Patch 8.2.2397
Patch 8.2.2397 Problem:Vim9: "%%" not seen as alternate file name for commands with a buffer name argument. Solution: Recognize "%%" like "#". (closes #7732) Files: src/buffer.c, src/testdir/test_vim9_cmd.vim *** ../vim-8.2.2396/src/buffer.c2021-01-15 16:22:48.708565105 +0100 --- src/buffer.c2021-01-23 15:14:22.928369185 +0100 *** *** 2564,2575 char_u*p; int toggledollar; ! if (pattern_end == pattern + 1 && (*pattern == '%' || *pattern == '#')) { ! if (*pattern == '%') ! match = curbuf->b_fnum; ! else match = curwin->w_alt_fnum; #ifdef FEAT_DIFF if (diffmode && !diff_mode_buf(buflist_findnr(match))) match = -1; --- 2564,2578 char_u*p; int toggledollar; ! // "%" is current file, "%%" or "#" is alternate file ! if ((pattern_end == pattern + 1 && (*pattern == '%' || *pattern == '#')) ! || (in_vim9script() && pattern_end == pattern + 2 ! && pattern[0] == '%' && pattern[1] == '%')) { ! if (*pattern == '#' || pattern_end == pattern + 2) match = curwin->w_alt_fnum; + else + match = curbuf->b_fnum; #ifdef FEAT_DIFF if (diffmode && !diff_mode_buf(buflist_findnr(match))) match = -1; *** ../vim-8.2.2396/src/testdir/test_vim9_cmd.vim 2021-01-23 14:22:10.228667110 +0100 --- src/testdir/test_vim9_cmd.vim 2021-01-23 15:11:45.144835546 +0100 *** *** 68,73 --- 68,84 edit Xfiletwo edit %%:r assert_equal('Xfileone', bufname()) + + assert_false(bufexists('altfoo')) + edit altfoo + edit bar + assert_true(bufexists('altfoo')) + assert_true(buflisted('altfoo')) + bdel %% + assert_true(bufexists('altfoo')) + assert_false(buflisted('altfoo')) + bwipe! altfoo + bwipe! bar END CheckDefAndScriptSuccess(lines) enddef *** ../vim-8.2.2396/src/version.c 2021-01-23 14:22:10.232667100 +0100 --- src/version.c 2021-01-23 15:01:31.434626883 +0100 *** *** 752,753 --- 752,755 { /* Add new patch number below this line */ + /**/ + 2397, /**/ -- >From the classified section of a city newspaper: Dog for sale: eats anything and is fond of children. /// 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/202101231415.10NEFilw2500113%40masaka.moolenaar.net.
Re: Test failure building 8.2.2395
On Sat, Jan 23, 2021 at 2:19 PM Elimar Riesebieter wrote: > > Hi all, > > building 8.2.2395 I get: > > From test_fold.vim: > Found errors in Test_fold_relative_move(): > command line..script > /source/vim/vim-8.2.2395/src/vim-gtk3/testdir/runtest.vim[468]..function > RunTheTest[39]..Test_fold_relative_move line 25: Expected 3 but got 2 > command line..script > /source/vim/vim-8.2.2395/src/vim-gtk3/testdir/runtest.vim[468]..function > RunTheTest[39]..Test_fold_relative_move line 30: Expected 2 but got 1 > > Building within tmux. Using clang-11 as compiler. Platform -> Linux amd64 > > Elimar I also see this test failure. I had created this ticket about it: https://github.com/vim/vim/issues/7731 Glad it's not just me who sees this test failure :-) Since not everybody sees the test failure, maybe it's triggered by some build configs? I need to check several build configs. I hope to find time later today to look at it, at least I want to look at the valgrind uninitialized memory in the ticket (although it may be unrelated to the test failure). 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_j3bv905ron1OWrCZkVWOoKqx1C%2BZee%3DzQ02BcUAACaNA%40mail.gmail.com.
Patch 8.2.2396
Patch 8.2.2396 Problem:Vim9: no white space allowed before "->". Solution: Allow for white space. (closes #7725) Files: src/ex_docmd.c, src/eval.c, src/testdir/test_vim9_cmd.vim *** ../vim-8.2.2395/src/ex_docmd.c 2021-01-16 20:20:59.646487092 +0100 --- src/ex_docmd.c 2021-01-23 13:59:24.252656985 +0100 *** *** 3313,3320 if (vim_strchr((char_u *)"{('[\"@", *p) != NULL || ((p = to_name_const_end(pskip)) > eap->cmd && *p != NUL)) { ! int oplen; ! int heredoc; if ( // "(..." is an expression. --- 3313,3321 if (vim_strchr((char_u *)"{('[\"@", *p) != NULL || ((p = to_name_const_end(pskip)) > eap->cmd && *p != NUL)) { ! int oplen; ! int heredoc; ! char_u *swp = skipwhite(p); if ( // "(..." is an expression. *** *** 3332,3338 || eap->cmd[1] == ':' ) // "varname->func()" is an expression. ! : (*p == '-' && p[1] == '>'))) { if (*eap->cmd == '{' && ends_excmd(*skipwhite(eap->cmd + 1))) { --- ,3339 || eap->cmd[1] == ':' ) // "varname->func()" is an expression. ! : (*swp == '-' && swp[1] == '>'))) { if (*eap->cmd == '{' && ends_excmd(*skipwhite(eap->cmd + 1))) { *** ../vim-8.2.2395/src/eval.c 2021-01-21 12:34:11.437508292 +0100 --- src/eval.c 2021-01-23 14:20:15.744968442 +0100 *** *** 3671,3677 /* * Evaluate "->method()". ! * "*arg" points to the '-'. * Returns FAIL or OK. "*arg" is advanced to after the ')'. */ static int --- 3671,3677 /* * Evaluate "->method()". ! * "*arg" points to "method". * Returns FAIL or OK. "*arg" is advanced to after the ')'. */ static int *** *** 3686,3693 typval_T base = *rettv; int ret; - // Skip over the ->. - *arg += 2; rettv->v_type = VAR_UNKNOWN; if (**arg == '{') --- 3686,3691 *** *** 3735,3741 /* * Evaluate "->method()". ! * "*arg" points to the '-'. * Returns FAIL or OK. "*arg" is advanced to after the ')'. */ static int --- 3733,3739 /* * Evaluate "->method()". ! * "*arg" points to "method". * Returns FAIL or OK. "*arg" is advanced to after the ')'. */ static int *** *** 3753,3760 int evaluate = evalarg != NULL && (evalarg->eval_flags & EVAL_EVALUATE); - // Skip over the ->. - *arg += 2; rettv->v_type = VAR_UNKNOWN; name = *arg; --- 3751,3756 *** *** 5765,5774 } else if (p[0] == '-' && p[1] == '>') { ! *arg = p; if (ret == OK) { ! if (((*arg)[2] == '{' && !in_vim9script()) || (*arg)[2] == '(') // expr->{lambda}() or expr->(lambda)() ret = eval_lambda(arg, rettv, evalarg, verbose); else --- 5761,5770 } else if (p[0] == '-' && p[1] == '>') { ! *arg = skipwhite(p + 2); if (ret == OK) { ! if ((**arg == '{' && !in_vim9script()) || **arg == '(') // expr->{lambda}() or expr->(lambda)() ret = eval_lambda(arg, rettv, evalarg, verbose); else *** ../vim-8.2.2395/src/testdir/test_vim9_cmd.vim 2021-01-19 22:48:06.267990184 +0100 --- src/testdir/test_vim9_cmd.vim 2021-01-23 14:13:07.274122686 +0100 *** *** 319,324 --- 319,338 CheckScriptSuccess(lines) enddef + def Test_method_call_whitespace() + var lines =<< trim END + new + var yank = 'text' + yank->setline(1) + yank ->setline(2) + yank-> setline(3) + yank -> setline(4) + assert_equal(['text', 'text', 'text', 'text'], getline(1, 4)) + bwipe! + END + CheckDefAndScriptSuccess(lines) + enddef + def Test_skipped_expr_linebreak() if 0 var x = [] *** ../vim-8.2.2395/src/version.c 2021-01-23 13:39:10.395533599 +0100 --- src/version.c 2021-01-23 14:06:30.087263331 +0100 *** *** 752,753 --- 752,755 { /* Add new patch number below this line */ + /**/ + 2396, /**/ -- 'Psychologist' -- Someone who looks at everyone else when an attractive woman enters the room. /// 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/// \\\
Test failure building 8.2.2395
Hi all, building 8.2.2395 I get: >From test_fold.vim: Found errors in Test_fold_relative_move(): command line..script /source/vim/vim-8.2.2395/src/vim-gtk3/testdir/runtest.vim[468]..function RunTheTest[39]..Test_fold_relative_move line 25: Expected 3 but got 2 command line..script /source/vim/vim-8.2.2395/src/vim-gtk3/testdir/runtest.vim[468]..function RunTheTest[39]..Test_fold_relative_move line 30: Expected 2 but got 1 Building within tmux. Using clang-11 as compiler. Platform -> Linux amd64 Elimar -- Learned men are the cisterns of knowledge, not the fountainheads ;-) -- -- 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/20210123131916.pkv2baiiuo3jewoq%40toy.home.lxtec.de.
Patch 8.2.2395
Patch 8.2.2395 Problem:Vim9: error for wrong type may report wrong line number. Solution: Save and restore the line number when evaluating the expression. (closes #7727) Files: src/evalvars.c, src/testdir/test_vim9_assign.vim *** ../vim-8.2.2394/src/evalvars.c 2021-01-21 21:42:09.409150461 +0100 --- src/evalvars.c 2021-01-23 13:38:24.387624290 +0100 *** *** 838,843 --- 838,845 i = FAIL; if (has_assign || concat) { + int cur_lnum; + op[0] = '='; op[1] = NUL; if (*expr != '=') *** *** 882,891 --- 884,898 evalarg.eval_cookie = eap->cookie; } expr = skipwhite_and_linebreak(expr, ); + cur_lnum = SOURCING_LNUM; i = eval0(expr, , eap, ); if (eap->skip) --emsg_skip; clear_evalarg(, eap); + + // Restore the line number so that any type error is given for the + // declaration, not the expression. + SOURCING_LNUM = cur_lnum; } if (eap->skip) { *** ../vim-8.2.2394/src/testdir/test_vim9_assign.vim2021-01-21 12:34:11.441508288 +0100 --- src/testdir/test_vim9_assign.vim2021-01-23 13:37:50.631689713 +0100 *** *** 55,60 --- 55,62 CheckDefAndScriptFailure(['var x: bool = [1]'], 'E1012:') CheckDefAndScriptFailure(['var x: bool = {}'], 'E1012:') CheckDefAndScriptFailure(['var x: bool = "x"'], 'E1012:') + + CheckDefAndScriptFailure(['var x: bool = "x"', '', 'eval 0'], 'E1012:', 1) enddef def Test_syntax() *** ../vim-8.2.2394/src/version.c 2021-01-22 22:31:06.676005413 +0100 --- src/version.c 2021-01-23 13:36:25.611849826 +0100 *** *** 752,753 --- 752,755 { /* Add new patch number below this line */ + /**/ + 2395, /**/ -- hundred-and-one symptoms of being an internet addict: 216. Your pet rock leaves home. /// 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/202101231239.10NCdiPn2475057%40masaka.moolenaar.net.
Re: [vim/vim] Vim9: crash hard to reproduce (#7733)
> Also, I've tried to group all the commands in a single file, but > without success. It seems they really need to be in different > scripts, possibly in different contexts (legacy vs Vim9). The location of the crash is where it's dealing with script-local variables that were declared inside a block. So yes, the script matters very much. Look out for any "var" inside a block. > I forgot to mention that when Vim is started with the previous shell > command, it gives these errors: > > Error detected while processing /home/user/.vim/plugin/fugitive.vim: > line2: > E10: \ should be followed by /, ? or & > line3: > E10: \ should be followed by /, ? or & > > Not sure why. I ignore them by pressing Enter. This indicates line continuation with a backslash is used in compatible mode. 'cpo' should be set to the Vim value. > This in `~/.vim/plugged/vim-cmdline/plugin/cmdline.vim`: > > vim9 > au CmdlineLeave : timer_start(0, () => execute('au SafeState * ++once #')) This should not have any effect. Does the crash still happen if you remove this? I don't see another hint, thus I hope you can find out more. -- hundred-and-one symptoms of being an internet addict: 214. Your MCI "Circle of Friends" are all Hayes-compatible. /// 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/202101231138.10NBcXak2459691%40masaka.moolenaar.net.