fix(defaults): only repeat macro for each selected line if linewise (#28289)

As mentioned in #28287, repeating a macro for each selected line doesn't
really make sense in non-linewise Visual mode.

Fix #28287
This commit is contained in:
zeertzjq
2024-04-15 03:43:33 +08:00
committed by GitHub
parent f6a3fdd684
commit aa1d0ac095
5 changed files with 15 additions and 51 deletions

View File

@@ -131,43 +131,6 @@ helloFOO123
helloFOO]]
end)
-- XXX: does this really make sense?
it('can be replayed with @ in blockwise Visual mode', function()
insert [[
hello
hello
hello]]
feed [[gg]]
feed [[qqAFOO<esc>qu]]
expect [[
hello
hello
hello]]
feed [[qwA123<esc>qu]]
expect [[
hello
hello
hello]]
feed [[<C-v>3j@q]]
expect [[
helloFOO
helloFOO
helloFOO]]
feed [[gg<C-v>j@w]]
expect [[
helloFOO123
helloFOO123
helloFOO]]
end)
end)
describe('macros without default mappings', function()
before_each(clear)
it('can be recorded and replayed in Visual mode', function()
insert('foo BAR BAR foo BAR foo BAR BAR BAR foo BAR BAR')
feed('0vqifofRq')