2014-10-27 11:20:54 -07:00
|
|
|
-- Tests Blockwise Visual when there are TABs before the text.
|
|
|
|
-- First test for undo working properly when executing commands from a register.
|
|
|
|
-- Also test this in an empty buffer.
|
|
|
|
|
2016-04-23 16:53:11 -07:00
|
|
|
local helpers = require('test.functional.helpers')(after_each)
|
2014-10-27 11:20:54 -07:00
|
|
|
local clear, feed, insert = helpers.clear, helpers.feed, helpers.insert
|
2017-04-08 14:12:26 -07:00
|
|
|
local feed_command, expect = helpers.feed_command, helpers.expect
|
2014-10-27 11:20:54 -07:00
|
|
|
|
|
|
|
describe('blockwise visual', function()
|
|
|
|
setup(clear)
|
|
|
|
|
|
|
|
it('is working', function()
|
|
|
|
insert([[
|
|
|
|
123456
|
|
|
|
234567
|
|
|
|
345678
|
|
|
|
|
|
|
|
test text test tex start here
|
|
|
|
some text
|
|
|
|
test text
|
|
|
|
test text
|
|
|
|
|
|
|
|
x jAy kdd
|
|
|
|
Ox jAy kdd]])
|
|
|
|
|
|
|
|
feed(":let @a = 'Ox<C-v><Esc>jAy<C-v><Esc>kdd'<cr>")
|
|
|
|
feed('G0k@au')
|
2017-04-08 14:12:26 -07:00
|
|
|
feed_command('new')
|
2014-10-27 11:20:54 -07:00
|
|
|
feed('@auY')
|
2017-04-08 14:12:26 -07:00
|
|
|
feed_command('quit')
|
2014-10-27 11:20:54 -07:00
|
|
|
feed('GP')
|
2017-04-08 14:12:26 -07:00
|
|
|
feed_command('/start here')
|
2014-10-27 11:20:54 -07:00
|
|
|
feed('"by$<C-v>jjlld')
|
2017-04-08 14:12:26 -07:00
|
|
|
feed_command('/456')
|
2014-10-27 11:20:54 -07:00
|
|
|
feed('<C-v>jj"bP')
|
2017-04-08 14:12:26 -07:00
|
|
|
feed_command('$-3,$d')
|
2014-10-27 11:20:54 -07:00
|
|
|
|
|
|
|
expect([[
|
|
|
|
123start here56
|
|
|
|
234start here67
|
|
|
|
345start here78
|
|
|
|
|
|
|
|
test text test tex rt here
|
|
|
|
somext
|
|
|
|
tesext
|
|
|
|
test text]])
|
|
|
|
end)
|
|
|
|
end)
|