Mercurial > vim
comparison src/testdir/test_gn.vim @ 18448:35e0ab1f2975 v8.1.2218
patch 8.1.2218: "gN" is off by one in Visual mode
Commit: https://github.com/vim/vim/commit/453c19257f6d97904ec2e3823e88e63c983f2f9a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Oct 26 14:42:09 2019 +0200
patch 8.1.2218: "gN" is off by one in Visual mode
Problem: "gN" is off by one in Visual mode.
Solution: Check moving forward. (Christian Brabandt, https://github.com/vim/vim/issues/5075)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 26 Oct 2019 14:45:03 +0200 |
parents | 3b80bdbdc832 |
children | c0445cb7cfe0 |
comparison
equal
deleted
inserted
replaced
18447:d978101d8bfd | 18448:35e0ab1f2975 |
---|---|
146 call setline('.', ['12345678']) | 146 call setline('.', ['12345678']) |
147 let @/ = '5' | 147 let @/ = '5' |
148 norm! gg0f7vhhhhgnd | 148 norm! gg0f7vhhhhgnd |
149 call assert_equal(['12348'], getline(1,'$')) | 149 call assert_equal(['12348'], getline(1,'$')) |
150 sil! %d _ | 150 sil! %d _ |
151 call setline('.', ['12345678']) | |
152 let @/ = '5' | |
153 norm! gg0f2vf7gNd | |
154 call assert_equal(['1678'], getline(1,'$')) | |
155 sil! %d _ | |
151 | 156 |
152 set wrapscan&vim | 157 set wrapscan&vim |
153 endfu | 158 endfu |
154 | 159 |
155 func Test_gn_multi_line() | 160 func Test_gn_multi_line() |