- Rename `meth_pcall`.
- Make `pcall_err` raise an error if the function does not fail.
- Add `vim.pesc()` to treat a string as literal where a Lua pattern is
expected.
Unfortunately we cannot indiscriminately replace xfree() with
XFREE_CLEAR(), because comparing pointers after freeing them is a common
pattern. Example in `tv_list_remove_items()`:
xfree(li);
if (li == item2) {
break;
}
Instead we can do it selectively/explicitly.
ref #1375
- redraw! in an invisible buffer rendered the screen unusable.
- storing the autocmd window handle and using it in API function could lead
to crashes. Unregister the handle when the window is not active.
Problem: If autocmd pattern only contained `++once` handlers, and
all of them completed, then there would be an empty group
displayed by `:autocmd Foo`.
Solution: Delete the pattern if all of its commands were deleted.
Adds a new feature to :autocmd which sets the handler to be executed at
most one times.
Before:
augroup FooGroup
autocmd!
autocmd FileType foo call Foo() | autocmd! FooGroup * <buffer>
augroup END
After:
autocmd FileType foo once call Foo()
It is otherwise impossible to determine which test failed sanitizer/valgrind
check. test/functional/helpers.lua module return was changed so that tests which
do not provide after_each function to get new check will automatically fail.