Files
neovim/runtime
Sean Dewar aa4e47f704 fix(api): disallow some more functions during textlock
Problem: nvim_buf_set_text(), nvim_open_term() and termopen() all change buffer
text, which is forbidden during textlock. Additionally, nvim_open_term() and
termopen() may be used to convert the cmdwin buffer into a terminal buffer,
which is weird.

Solution: Allow nvim_buf_set_text() and nvim_open_term() in the cmdwin, but
disallow nvim_open_term() from converting the cmdwin buffer into a terminal
buffer. termopen() is not allowed in the cmdwin (as it always operates on
curbuf), so just check text_locked().

Also happens to improve the error in #21055: nvim_buf_set_text() was callable
during textlock, but happened to check textlock indirectly via u_save();
however, this caused the error to be overwritten by an unhelpful "Failed to
save undo information" message when msg_list == NULL (e.g: an `<expr>` mapping
invoked outside of do_cmdline()).
2023-07-05 08:33:32 +01:00
..
2023-04-23 15:22:55 +02:00
2022-12-08 16:33:38 +01:00
2023-06-11 12:40:22 +01:00
2021-09-13 16:33:41 +02:00
2021-05-01 22:29:03 -04:00
2023-05-15 09:38:32 +02:00
2023-06-11 12:40:22 +01:00
2022-08-20 10:04:55 +02:00
2021-04-27 09:21:32 -04:00
2023-05-15 09:38:32 +02:00
2023-04-13 12:15:30 +02:00
2023-04-07 13:26:29 +02:00
2022-10-17 08:19:48 +02:00