neovim/runtime/lua/vim
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
..
_meta feat(paste): unify cancel and error behavior (#30476) 2024-09-24 07:14:14 +08:00
deprecated refactor(lua): use tuple syntax everywhere #29111 2024-06-04 06:06:02 -07:00
filetype vim-patch:9.1.0635: filetype: SuperHTML template files not recognized 2024-07-29 09:12:14 +02:00
func fix(treesitter): return correct match table in iter_captures() 2024-03-27 10:39:46 +00:00
health fix(health): check more "old" files #30421 2024-09-19 06:34:23 -07:00
lsp Merge #30435 refactor: rename "Dictionary" => "Dict" 2024-09-23 07:14:10 -07:00
provider fix(vim.fs): dirname() returns "." on mingw/msys2 #30480 2024-09-23 06:05:58 -07:00
treesitter fix(treesitter): lint top-level anonymous nodes 2024-09-20 08:44:43 +02:00
ui/clipboard fix(osc52): use nvim_chan_send() to stderr for copying (#26690) 2023-12-21 11:47:04 +08:00
_comment.lua feat(treesitter): start moving get_parser to return nil #30313 2024-09-13 05:09:11 -07:00
_defaults.lua fix(defaults): cannot remove "How-to disable mouse" menu item #30375 2024-09-14 02:18:38 -07:00
_editor.lua docs: misc #28970 2024-09-01 13:01:24 -07:00
_init_packages.lua refactor(types): more fixes 2024-03-06 10:45:22 +00:00
_inspector.lua refactor: use vim._with where possible 2024-06-28 19:58:31 +02:00
_meta.lua refactor: fix luals type warnings 2024-05-27 20:48:46 +02:00
_options.lua fix(vim.wo): never allow non-zero bufnr 2024-06-12 15:42:56 +01:00
_system.lua fix(vim.ui): open() may wait indefinitely #28325 2024-04-15 04:33:09 -07:00
_watch.lua fix(watch): exclude .git when using inotifywait (#29914) 2024-08-01 16:00:48 +02:00
diagnostic.lua fix(diagnostic): fix backwards compatibility for goto_next and goto_prev (#29593) 2024-07-09 14:08:12 -05:00
F.lua fix(diagnostic): typing 2024-01-16 09:33:10 +00:00
filetype.lua fix(filetype): handle .in files with no filename (#30487) 2024-09-24 06:42:16 +08:00
fs.lua fix(vim.fs): dirname() returns "." on mingw/msys2 #30480 2024-09-23 06:05:58 -07:00
func.lua fix(treesitter): return correct match table in iter_captures() 2024-03-27 10:39:46 +00:00
glob.lua fix(glob): avoid subcapture nesting too deep error (#29520) 2024-07-06 11:40:08 +02:00
health.lua fix(health): return correct name from 'path2name()' 2024-09-11 07:55:37 +03:00
highlight.lua refactor: use vim._with where possible 2024-06-28 19:58:31 +02:00
inspect.lua fix(inspect): escape identifiers that are lua keywords (#19898) 2022-08-23 13:02:55 +02:00
iter.lua docs: misc #28970 2024-09-01 13:01:24 -07:00
keymap.lua refactor(lua): type annotations 2024-03-16 19:26:10 +00:00
loader.lua fix(vim.fs): dirname() returns "." on mingw/msys2 #30480 2024-09-23 06:05:58 -07:00
lsp.lua docs: misc (#29719) 2024-08-29 06:11:32 +08:00
provider.lua refactor: create function for deferred loading 2024-02-03 16:53:41 +01:00
re.lua docs: auto-generate docs for vim.lpeg and vim.re 2024-01-14 11:08:33 +00:00
secure.lua refactor(lua): type annotations 2024-03-16 19:26:10 +00:00
shared.lua fix(lua): revert vim.tbl_extend behavior change and document it 2024-09-08 21:06:13 +02:00
snippet.lua fix(snippet): modify base indentation when there's actually whitespace (#29670) 2024-07-16 19:30:22 +02:00
termcap.lua docs: various fixes (#28208) 2024-04-30 07:04:42 +08:00
text.lua fix(vim.text): handle very long strings (#30075) 2024-08-17 22:28:03 -05:00
treesitter.lua feat(treesitter): start moving get_parser to return nil #30313 2024-09-13 05:09:11 -07:00
ui.lua feat(vim.ui): configurable "gx" / vim.ui.open() tool 2024-09-16 11:58:02 +02:00
uri.lua fix(lua): remove uri fragment from file paths (#27647) 2024-02-28 10:50:53 +01:00
version.lua fix(version): return nil with empty string 2024-07-27 14:06:31 +01:00
vimhelp.lua feat(treesitter): start moving get_parser to return nil #30313 2024-09-13 05:09:11 -07:00