To: vim_dev@googlegroups.com Subject: Patch 8.2.2363 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2363 Problem: curpos() does not accept a string argument as before. solution: Make a string argument work again. (Yegappan Lakshmanan, closes #7690 Files: src/evalfunc.c, src/testdir/test_cursor_func.vim *** ../vim-8.2.2362/src/evalfunc.c 2021-01-16 16:06:58.126713782 +0100 --- src/evalfunc.c 2021-01-16 16:50:05.640824474 +0100 *************** *** 2767,2773 **** } else if ((argvars[0].v_type == VAR_NUMBER || argvars[0].v_type == VAR_STRING) ! && argvars[1].v_type == VAR_NUMBER) { line = tv_get_lnum(argvars); if (line < 0) --- 2767,2774 ---- } else if ((argvars[0].v_type == VAR_NUMBER || argvars[0].v_type == VAR_STRING) ! && (argvars[1].v_type == VAR_NUMBER || ! argvars[1].v_type == VAR_STRING)) { line = tv_get_lnum(argvars); if (line < 0) *** ../vim-8.2.2362/src/testdir/test_cursor_func.vim 2021-01-13 20:08:34.733054890 +0100 --- src/testdir/test_cursor_func.vim 2021-01-16 16:50:05.640824474 +0100 *************** *** 25,30 **** --- 25,33 ---- " below last line goes to last line eval [9, 1]->cursor() call assert_equal([4, 1, 0, 1], getcurpos()[1:]) + " pass string arguments + call cursor('3', '3') + call assert_equal([3, 3, 0, 3], getcurpos()[1:]) call setline(1, ["\"]) call cursor(1, 1, 1) *** ../vim-8.2.2362/src/version.c 2021-01-16 16:06:58.126713782 +0100 --- src/version.c 2021-01-16 16:49:02.641078480 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2363, /**/ -- You're as much use as a condom machine at the Vatican. -- Rimmer to Holly in Red Dwarf 'Queeg' /// Bram Moolenaar -- Bram@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 ///