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, ["\<TAB>"])
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 -- [email protected] -- 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202101161555.10GFt5w6317287%40masaka.moolenaar.net.