0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.4319: :put does not work properly in compiled function

Problem:    :put does not work properly in compiled function. (John Beckett)
Solution:   Adjust the direction when using line zero.
This commit is contained in:
Bram Moolenaar
2022-02-07 15:31:37 +00:00
parent 54969f4ef5
commit 4e713bafc0
3 changed files with 14 additions and 1 deletions

View File

@@ -4617,7 +4617,12 @@ exec_instructions(ectx_T *ectx)
// :put! above cursor
dir = BACKWARD;
else if (lnum >= 0)
curwin->w_cursor.lnum = iptr->isn_arg.put.put_lnum;
{
curwin->w_cursor.lnum = lnum;
if (lnum == 0)
// check_cursor() below will move to line 1
dir = BACKWARD;
}
if (regname == '=')
{