Patch 8.2.3581
Problem: Reading character past end of line.
Solution: Correct the cursor column.
Files: src/ex_docmd.c, src/testdir/test_put.vim
*** ../vim-8.2.3580/src/ex_docmd.c 2021-10-13 15:04:28.859631740 +0100
--- src/ex_docmd.c 2021-11-04 15:07:10.147038285 +0000
***************
*** 7774,7779 ****
--- 7774,7780 ----
eap->forceit = TRUE;
}
curwin->w_cursor.lnum = eap->line2;
+ check_cursor_col();
do_put(eap->regname, NULL, eap->forceit ? BACKWARD : FORWARD, 1L,
PUT_LINE|PUT_CURSLINE);
}
*** ../vim-8.2.3580/src/testdir/test_put.vim 2021-11-03 13:43:12.542316893 +0000
--- src/testdir/test_put.vim 2021-11-04 15:08:05.903801074 +0000
***************
*** 159,163 ****
--- 159,172 ----
bwipe!
endfunc
+ func Test_put_above_first_line()
+ new
+ let @" = 'text'
+ silent! normal 0o00
+ 0put
+ call assert_equal('text', getline(1))
+ bwipe!
+ endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.2.3580/src/version.c 2021-11-04 13:28:26.082236210 +0000
--- src/version.c 2021-11-04 15:02:48.307440714 +0000
***************
*** 759,760 ****
--- 759,762 ----
{ /* Add new patch number below this line */
+ /**/
+ 3581,
/**/
--
E M A C S
s e l o h
c t t n i
a a t f
p r t
e o
l
/// 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 ///