diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-04-27 17:30:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-27 17:30:22 +0100 |
commit | eb4676c67f5dd54bcda473783315901a3444b40b (patch) | |
tree | b57dd8342e3de756031664188ab542ead9134c38 /runtime | |
parent | 9f29176033926b81553985deaba0ea162ca40215 (diff) | |
download | rneovim-eb4676c67f5dd54bcda473783315901a3444b40b.tar.gz rneovim-eb4676c67f5dd54bcda473783315901a3444b40b.tar.bz2 rneovim-eb4676c67f5dd54bcda473783315901a3444b40b.zip |
fix: disallow removing extmarks in on_lines callbacks (#23219)
fix(extmarks): disallow removing extmarks in on_lines callbacks
decor_redraw_start (which runs before decor_providers_invoke_lines) gets
references for the extmarks on a specific line. If these extmarks are
deleted in on_lines callbacks then this results in a heap-use-after-free
error.
Fixes #22801
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/api.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index d63563cc05..8d7253a754 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -2763,11 +2763,14 @@ nvim_set_decoration_provider({ns_id}, {*opts}) for the extmarks set/modified inside the callback anyway. Note: doing anything other than setting extmarks is considered - experimental. Doing things like changing options are not expliticly + experimental. Doing things like changing options are not explicitly forbidden, but is likely to have unexpected consequences (such as 100% CPU consumption). doing `vim.rpcnotify` should be OK, but `vim.rpcrequest` is quite dubious for the moment. + Note: It is not allowed to remove or update extmarks in 'on_line' + callbacks. + Attributes: ~ Lua |vim.api| only |