diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-04-10 08:50:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-10 08:50:36 +0800 |
commit | 49983387ffd54fe0888f17098e43318a443315ac (patch) | |
tree | de1c226b136bb1258e589eaa920c08ee79dcd8f7 /test/functional/lua/buffer_updates_spec.lua | |
parent | f49408454ddb48016d51b48bcd9d5dab538f5cc7 (diff) | |
download | rneovim-49983387ffd54fe0888f17098e43318a443315ac.tar.gz rneovim-49983387ffd54fe0888f17098e43318a443315ac.tar.bz2 rneovim-49983387ffd54fe0888f17098e43318a443315ac.zip |
fix(prompt): emit change event for prompt newline (#28260)
Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
Diffstat (limited to 'test/functional/lua/buffer_updates_spec.lua')
-rw-r--r-- | test/functional/lua/buffer_updates_spec.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/functional/lua/buffer_updates_spec.lua b/test/functional/lua/buffer_updates_spec.lua index 490177b96b..7ee4100137 100644 --- a/test/functional/lua/buffer_updates_spec.lua +++ b/test/functional/lua/buffer_updates_spec.lua @@ -1266,6 +1266,25 @@ describe('lua: nvim_buf_attach on_bytes', function() } end) + it('prompt buffer', function() + local check_events = setup_eventcheck(verify, {}) + api.nvim_set_option_value('buftype', 'prompt', {}) + feed('i') + check_events { + { 'test1', 'bytes', 1, 3, 0, 0, 0, 0, 0, 0, 0, 2, 2 }, + } + feed('<CR>') + check_events { + { 'test1', 'bytes', 1, 4, 1, 0, 3, 0, 0, 0, 1, 0, 1 }, + { 'test1', 'bytes', 1, 5, 1, 0, 3, 0, 0, 0, 0, 2, 2 }, + } + feed('<CR>') + check_events { + { 'test1', 'bytes', 1, 6, 2, 0, 6, 0, 0, 0, 1, 0, 1 }, + { 'test1', 'bytes', 1, 7, 2, 0, 6, 0, 0, 0, 0, 2, 2 }, + } + end) + local function test_lockmarks(mode) local description = (mode ~= '') and mode or '(baseline)' it('test_lockmarks ' .. description .. ' %delete _', function() |