Patch 8.2.3455

4 views
Skip to first unread message

Bram Moolenaar

unread,
Sep 22, 2021, 10:44:38 AMSep 22
to vim...@googlegroups.com

Patch 8.2.3455 (after 8.2.3454)
Problem: Using a count with "gp" leaves '] in wrong position. (Naohiro Ono)
Solution: Correct the mark position. (closes #8899)
Files: src/register.c, src/testdir/test_put.vim


*** ../vim-8.2.3454/src/register.c 2021-09-22 16:37:03.982329257 +0200
--- src/register.c 2021-09-22 16:39:35.537945510 +0200
***************
*** 2205,2210 ****
--- 2205,2213 ----
{
curwin->w_cursor.lnum = new_lnum;
curwin->w_cursor.col = col;
+ curbuf->b_op_end = curwin->w_cursor;
+ if (col > 1)
+ curbuf->b_op_end.col = col - 1;
}
}
else if (y_type == MLINE)
*** ../vim-8.2.3454/src/testdir/test_put.vim 2021-09-22 16:37:03.982329257 +0200
--- src/testdir/test_put.vim 2021-09-22 16:41:59.705586869 +0200
***************
*** 126,133 ****
new
call setline(1, '<---->')
call setreg('@', "foo\nbar", 'c')
! exe "normal 1G3|3gpix\<Esc>"
! call assert_equal(['<--foo', 'barfoo', 'barfoo', 'barx-->'], getline(1, '$'))

bwipe!
endfunc
--- 126,135 ----
new
call setline(1, '<---->')
call setreg('@', "foo\nbar", 'c')
! normal 1G3|3gp
! call assert_equal([0, 4, 4, 0], getpos("."))
! call assert_equal(['<--foo', 'barfoo', 'barfoo', 'bar-->'], getline(1, '$'))
! call assert_equal([0, 4, 3, 0], getpos("']"))

bwipe!
endfunc
*** ../vim-8.2.3454/src/version.c 2021-09-22 16:37:03.982329257 +0200
--- src/version.c 2021-09-22 16:43:12.525407529 +0200
***************
*** 759,760 ****
--- 759,762 ----
{ /* Add new patch number below this line */
+ /**/
+ 3455,
/**/

--
hundred-and-one symptoms of being an internet addict:
51. You put a pillow case over your laptop so your lover doesn't see it while
you are pretending to catch your breath.

/// Bram Moolenaar -- Br...@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 ///
Reply all
Reply to author
Forward
0 new messages