diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-09-22 06:02:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-22 06:02:48 +0800 |
commit | e697c1b43dfbeab132fee4149157f7abd08c51a0 (patch) | |
tree | 4fb363d573f9606f7314799e03c6ba9e0f5fd0e1 /test/functional/terminal/tui_spec.lua | |
parent | 1d815acd78e5b961302985b80d2b625947902386 (diff) | |
download | rneovim-e697c1b43dfbeab132fee4149157f7abd08c51a0.tar.gz rneovim-e697c1b43dfbeab132fee4149157f7abd08c51a0.tar.bz2 rneovim-e697c1b43dfbeab132fee4149157f7abd08c51a0.zip |
fix(paste): improve repeating of pasted text (#30438)
- Fixes 'autoindent' being applied during redo.
- Makes redoing a large paste significantly faster.
- Stores pasted text in the register being recorded.
Fix #28561
Diffstat (limited to 'test/functional/terminal/tui_spec.lua')
-rw-r--r-- | test/functional/terminal/tui_spec.lua | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index 3e837e796d..a8a664a568 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -1106,7 +1106,7 @@ describe('TUI', function() screen:expect(expected_grid1) -- Dot-repeat/redo. feed_data('.') - screen:expect([[ + local expected_grid2 = [[ ESC:{6:^[} / CR: | xline 1 | ESC:{6:^[} / CR: | @@ -1114,7 +1114,8 @@ describe('TUI', function() {5:[No Name] [+] 5,1 Bot}| | {3:-- TERMINAL --} | - ]]) + ]] + screen:expect(expected_grid2) -- Undo. feed_data('u') expect_child_buf_lines(expected_crlf) @@ -1128,6 +1129,14 @@ describe('TUI', function() feed_data('\027[200~' .. table.concat(expected_lf, '\r\n') .. '\027[201~') screen:expect(expected_grid1) expect_child_buf_lines(expected_crlf) + -- Dot-repeat/redo. + feed_data('.') + screen:expect(expected_grid2) + -- Undo. + feed_data('u') + expect_child_buf_lines(expected_crlf) + feed_data('u') + expect_child_buf_lines({ '' }) end) it('paste: cmdline-mode inserts 1 line', function() |