Mercurial > vim
comparison src/testdir/test_put.vim @ 25840:8ff483b86d9b v8.2.3454
patch 8.2.3454: using a count with "gp" leave cursor in wrong position
Commit: https://github.com/vim/vim/commit/23003e51e18371afda4420d9e171a3dcba5a31cc
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 22 16:37:07 2021 +0200
patch 8.2.3454: using a count with "gp" leave cursor in wrong position
Problem: Using a count with "gp" leave cursor in wrong position. (Naohiro
Ono)
Solution: Count the inserted lines. (closes #8899)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 22 Sep 2021 16:45:03 +0200 |
parents | ff21e2962490 |
children | 196f75cf6983 |
comparison
equal
deleted
inserted
replaced
25839:9f8cd3eb33c7 | 25840:8ff483b86d9b |
---|---|
120 normal! VG"rgp | 120 normal! VG"rgp |
121 call assert_equal(1, line('$')) | 121 call assert_equal(1, line('$')) |
122 close! | 122 close! |
123 endfunc | 123 endfunc |
124 | 124 |
125 func Test_gp_with_count_leaves_cursor_at_end() | |
126 new | |
127 call setline(1, '<---->') | |
128 call setreg('@', "foo\nbar", 'c') | |
129 exe "normal 1G3|3gpix\<Esc>" | |
130 call assert_equal(['<--foo', 'barfoo', 'barfoo', 'barx-->'], getline(1, '$')) | |
131 | |
132 bwipe! | |
133 endfunc | |
134 | |
125 " vim: shiftwidth=2 sts=2 expandtab | 135 " vim: shiftwidth=2 sts=2 expandtab |