diff options
author | bfredl <bjorn.linse@gmail.com> | 2025-01-09 13:35:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-09 13:35:25 +0100 |
commit | 6dd7fcaafdc5d80948e1c4b05b19584de16528d6 (patch) | |
tree | cf7a19a9182275e4c49b4f5850047146ad453124 /test/functional/terminal/buffer_spec.lua | |
parent | 3f0adf90debb35b5a937480151a659d654106ff6 (diff) | |
parent | f8c8a245aa5bdfc2092f7e910a2d4ce798cd188e (diff) | |
download | rneovim-6dd7fcaafdc5d80948e1c4b05b19584de16528d6.tar.gz rneovim-6dd7fcaafdc5d80948e1c4b05b19584de16528d6.tar.bz2 rneovim-6dd7fcaafdc5d80948e1c4b05b19584de16528d6.zip |
Merge pull request #31898 from bfredl/termbomb
fix(terminal): don't crash on unprintable chars
Diffstat (limited to 'test/functional/terminal/buffer_spec.lua')
-rw-r--r-- | test/functional/terminal/buffer_spec.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua index b6de687af9..cc807ba555 100644 --- a/test/functional/terminal/buffer_spec.lua +++ b/test/functional/terminal/buffer_spec.lua @@ -435,6 +435,19 @@ describe(':terminal buffer', function() ]]) end) + it('handles unprintable chars', function() + local screen = Screen.new(50, 7) + feed 'i' + local chan = api.nvim_open_term(0, {}) + api.nvim_chan_send(chan, '\239\187\191') -- '\xef\xbb\xbf' + screen:expect([[ + {18:<feff>}^ | + |*5 + {5:-- TERMINAL --} | + ]]) + eq('\239\187\191', api.nvim_get_current_line()) + end) + it("handles bell respecting 'belloff' and 'visualbell'", function() local screen = Screen.new(50, 7) local chan = api.nvim_open_term(0, {}) |