| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: famiu <famiuhaque@protonmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Instead of nested linked lists, store autocommands in a flat, contiguous
kvec_t, with one kvec_t per event type. Previously patterns were stored
in each node of the outer linked list, so they can be matched only once
on repeating patterns. They are now reference counted and referenced in
each autocommand, and matching is skipped if the pattern repeats. Speeds
up creation and deletion, execution is not affected.
Co-authored-by: ii14 <ii14@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
Now with try_end() including more exception info, E5500 looks like
redundant information.
Adjust tests for more exception information.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Autocommand that splits window messes up window layout.
Solution: Disallow splitting a window while closing one. In ":all" give an
error when moving a window will not work.
https://github.com/vim/vim/commit/1417c766f55e5959b31da488417b7d9b141404af
Expected error number was changed to E242 in Vim in patch 8.2.1183, and
patch 8.2.2420 (which has already been ported) made the test no longer
throw E249 in Vim, so just use E242 in the test.
|
|
|
|
|
|
|
| |
This makes v:event readonly in these four events:
- ChanInfo
- ChanOpen
- RecordingLeave
- TermClose
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nvim uses a floating window for the autocmd window, but in certain situations,
it can be made non-floating (`:wincmd J`), which can cause issues due to the
previous setup and cleanup logic for a non-floating aucmd_win being removed from
aucmd_prepbuf and aucmd_restbuf.
This can cause glitchiness and crashes due to the aucmd_win's frame being
invalid after closing its tabpage, for example.
Ensure aucmd_win cannot be made non-floating. The only place this happens is in
win_split_ins if new_wp != NULL.
|
|
|
|
|
|
| |
It is wrong to assume that you can't shorten a path if it's in `/`: you
can always shorten it by removing the forward slash.
Closes #14512
|
|
|
|
|
| |
- test: reduce verbosity, condense redundancy, improve readability
- auevents.lua: keep events sorted by name. ref afd1d412fa91
|
| |
|
|
|
|
|
|
| |
- only fire once, just before freeing mem
- trigger when on a different buffer
- avoid recursive calls in another tab
|
| |
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
| |
The message is useless, it doesn't even mention the event name.
vim_dev discussion:
https://groups.google.com/forum/#!msg/vim_dev/RTbq58TMq9w/Xr4rSoUTCgAJ
ref: https://github.com/vim/vim/issues/4300
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Based on feedback from upstream:
https://github.com/vim/vim/pull/4100
|
|
|
|
|
|
|
| |
- Rename "nested" to "-nested", but continue to support "nested" for
backwards-compatibility.
- Allow any order: "-once -nested" or "-nested -once".
ref https://github.com/neovim/neovim/pull/9706#issuecomment-471295747
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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()
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Problem: A plugin does not know when VimEnter autocommands were already
triggered.
Solution: Add the v:vim_did_enter variable.
https://github.com/vim/vim/commit/1473551a4457d4920b235eeeb9f279e196ee7225
|
|
|
|
|
|
| |
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.
|
|
|