Mercurial > vim
comparison src/testdir/test_put.vim @ 28988:e6f486df5cc9 v8.2.5016
patch 8.2.5016: access before start of text with a put command
Commit: https://github.com/vim/vim/commit/2a585c85013be22f59f184d49612074fd9b115d7
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed May 25 15:15:38 2022 +0100
patch 8.2.5016: access before start of text with a put command
Problem: Access before start of text with a put command.
Solution: Check the length is more than zero.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 25 May 2022 16:30:02 +0200 |
parents | fb67cd7d30a7 |
children | 575bc8eaa593 |
comparison
equal
deleted
inserted
replaced
28987:ddbc9ec9466b | 28988:e6f486df5cc9 |
---|---|
208 call assert_equal([0, 1, v:maxcol, 0], getpos("'>")) | 208 call assert_equal([0, 1, v:maxcol, 0], getpos("'>")) |
209 call assert_equal([0, 2, 7, 0], getpos("']")) | 209 call assert_equal([0, 2, 7, 0], getpos("']")) |
210 bwipe! | 210 bwipe! |
211 endfunc | 211 endfunc |
212 | 212 |
213 " this was putting a mark before the start of a line | |
214 func Test_put_empty_register() | |
215 new | |
216 norm yy | |
217 norm [Pi00ggv)s0 | |
218 sil! norm [P | |
219 bwipe! | |
220 endfunc | |
221 | |
213 | 222 |
214 " vim: shiftwidth=2 sts=2 expandtab | 223 " vim: shiftwidth=2 sts=2 expandtab |