Mercurial > vim
comparison src/vim9execute.c @ 27585:a31dd0a3cb39 v8.2.4319
patch 8.2.4319: :put does not work properly in compiled function
Commit: https://github.com/vim/vim/commit/4e713bafc0ae191b1830e3cd3c323ebd695bc3a1
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Feb 7 15:31:37 2022 +0000
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 07 Feb 2022 16:45:03 +0100 |
parents | 0b12dd90a5d6 |
children | d91be28bbdbb |
comparison
equal
deleted
inserted
replaced
27584:becde709128e | 27585:a31dd0a3cb39 |
---|---|
4615 } | 4615 } |
4616 else if (lnum == -2) | 4616 else if (lnum == -2) |
4617 // :put! above cursor | 4617 // :put! above cursor |
4618 dir = BACKWARD; | 4618 dir = BACKWARD; |
4619 else if (lnum >= 0) | 4619 else if (lnum >= 0) |
4620 curwin->w_cursor.lnum = iptr->isn_arg.put.put_lnum; | 4620 { |
4621 curwin->w_cursor.lnum = lnum; | |
4622 if (lnum == 0) | |
4623 // check_cursor() below will move to line 1 | |
4624 dir = BACKWARD; | |
4625 } | |
4621 | 4626 |
4622 if (regname == '=') | 4627 if (regname == '=') |
4623 { | 4628 { |
4624 tv = STACK_TV_BOT(-1); | 4629 tv = STACK_TV_BOT(-1); |
4625 if (tv->v_type == VAR_STRING) | 4630 if (tv->v_type == VAR_STRING) |