Mercurial > vim
comparison src/testdir/test_put.vim @ 25842:196f75cf6983 v8.2.3455
patch 8.2.3455: using a count with "gp" leaves '] in wrong position
Commit: https://github.com/vim/vim/commit/56858e4ed4e338e15821767b8303b06099e40384
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 22 16:43:59 2021 +0200
patch 8.2.3455: using a count with "gp" leaves '] in wrong position
Problem: Using a count with "gp" leaves '] in wrong position. (Naohiro Ono)
Solution: Correct the mark position. (closes https://github.com/vim/vim/issues/8899)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 22 Sep 2021 16:45:04 +0200 |
parents | 8ff483b86d9b |
children | 79a5c8238a5d |
comparison
equal
deleted
inserted
replaced
25841:f3fc9c20b2b3 | 25842:196f75cf6983 |
---|---|
124 | 124 |
125 func Test_gp_with_count_leaves_cursor_at_end() | 125 func Test_gp_with_count_leaves_cursor_at_end() |
126 new | 126 new |
127 call setline(1, '<---->') | 127 call setline(1, '<---->') |
128 call setreg('@', "foo\nbar", 'c') | 128 call setreg('@', "foo\nbar", 'c') |
129 exe "normal 1G3|3gpix\<Esc>" | 129 normal 1G3|3gp |
130 call assert_equal(['<--foo', 'barfoo', 'barfoo', 'barx-->'], getline(1, '$')) | 130 call assert_equal([0, 4, 4, 0], getpos(".")) |
131 call assert_equal(['<--foo', 'barfoo', 'barfoo', 'bar-->'], getline(1, '$')) | |
132 call assert_equal([0, 4, 3, 0], getpos("']")) | |
131 | 133 |
132 bwipe! | 134 bwipe! |
133 endfunc | 135 endfunc |
134 | 136 |
135 " vim: shiftwidth=2 sts=2 expandtab | 137 " vim: shiftwidth=2 sts=2 expandtab |