neovim/test/functional
zeertzjq d831392b15
feat(paste): unify cancel and error behavior (#30476)
Before this PR, the behavior of nvim_paste is:
- When vim.paste() returns false, return false to the client, but treat
  following chunks normally (i.e. rely on the client cancelling the
  paste as expected).
- When vim.paste() throws an error, still return true to the client, but
  drain the following chunks in the stream without calling vim.paste().

There are two problems with such behavior:
- When vim.paste() errors, the client is still supposed to send the
  remaining chunks of the stream, even though they do nothing.
- Having different code paths for two uncommon but similar situations
  complicates maintenance.

This PR makes both the cancel case and the error case return false to
the client and drain the remaining chunks of the stream, which, apart
from sharing the same code path, is beneficial whether the client checks
the return value of nvim_paste or not:
- If the client checks the return value, it can avoid sending the
  following chunks needlessly after an error.
- If the client doesn't check the return value, chunks following a
  cancelled chunk won't be pasted on the server regardless, which leads
  to less confusing behavior.
2024-09-24 07:14:14 +08:00
..
api feat(paste): unify cancel and error behavior (#30476) 2024-09-24 07:14:14 +08:00
autocmd refactor(tests): rename terminal/testutil.lua => testterm.lua #30372 2024-09-15 03:28:14 -07:00
core refactor(tests): rename terminal/testutil.lua => testterm.lua #30372 2024-09-15 03:28:14 -07:00
editor refactor!: rename 'jumpoptions' flag "unload" to "clean" (#30418) 2024-09-19 18:05:27 +08:00
ex_cmds refactor(test): rename alter_slashes, invert its behavior 2024-09-09 12:23:54 +02:00
fixtures feat(lsp): vim.lsp.buf.format() supports textDocument/rangesFormatting #27323 2024-06-24 07:54:56 -07:00
legacy vim-patch:9.1.0708: Recursive window update does not account for reset skipcol (#30217) 2024-09-01 20:19:19 +08:00
lua refactor(api)!: rename Dictionary => Dict 2024-09-23 14:42:57 +02:00
options fix(test): "tempdir not a directory" in CI logs 2024-09-09 12:23:54 +02:00
plugin refactor(api)!: rename Dictionary => Dict 2024-09-23 14:42:57 +02:00
provider refactor(tests): again yet more global highlight definitions 2024-08-14 14:03:34 +02:00
script fix(luacats): allow all types inside tuples 2024-06-01 12:56:43 +01:00
shada refactor(api)!: rename Dictionary => Dict 2024-09-23 14:42:57 +02:00
terminal feat(paste): unify cancel and error behavior (#30476) 2024-09-24 07:14:14 +08:00
treesitter test: support upvalues in exec_lua 2024-09-21 16:04:09 +01:00
ui vim-patch:9.1.0740: incorrect internal diff with empty file (#30471) 2024-09-23 12:04:07 +08:00
vimscript refactor(api)!: rename Dictionary => Dict 2024-09-23 14:42:57 +02:00
example_spec.lua test: improve test conventions 2024-04-23 18:17:04 +02:00
preload.lua test: improve test conventions 2024-04-23 18:17:04 +02:00
testnvim.lua feat(fs.lua): add vim.fs.rm() 2024-09-22 15:05:24 +01:00
testterm.lua refactor(tests): rename terminal/testutil.lua => testterm.lua #30372 2024-09-15 03:28:14 -07:00