| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
|
|
|
| |
Match Vim's behavior.
|
|
|
|
|
|
| |
Problem: Autocommand test fails on MS-Windows.
Solution: Use pathcmp() instead of strcmp() to check if a directory differs.
https://github.com/vim/vim/commit/9eb76af451ddd8eaad0cd5dd629f18c4f4035171
|
|
|
|
|
|
|
| |
Problem: DirChanged is also triggered when the directory didn't change.
(Daniel Hahler)
Solution: Compare the current with the new directory. (closes vim/vim#3697)
https://github.com/vim/vim/commit/2caad3fbbdbf1486a176c9f6bfbc3d9be90e09f7
|
|
|
|
|
|
|
|
|
|
|
| |
Problem
- `redir_exec` is obsolete, but it keeps getting used in new tests
because people copy existing tests.
- Disadvantages of `redir_exec`:
- Captures extra junk before the actual error/message that we _want_ to test.
- Does not fail on error, unlike e.g. `command()`.
Solution
- Use new functions like `nvim_exec` and `pcall_err`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
Subdirectories like "visual", "insert", "normal" encourage people to
separate *related* tests for no good reason. Typically the _mode_ is
not the relevant topic of a test (and when it is, _then_ create
an appropriate describe() or it()).
Solution:
- Delete the various `test/functional/<mode>/` subdirectories, move
their tests to more meaningful topics.
- Rename `…/normal/` to `…/editor/`.
- Move or merge `…/visual/*` and `…/insert/*` tests into here where
appropriate.
- Rename `…/eval/` to `…/vimscript/`.
- Move `…/viml/*` into here also.
* test(reorg): insert/* => editor/mode_insert_spec.lua
* test(reorg): cmdline/* => editor/mode_cmdline_spec.lua
* test(reorg): eval core tests => eval_spec.lua
|
|
|
| |
Closes #4713
|
|
|
|
|
|
| |
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
|
|\
| |
| | |
Implement BufModifiedSet autocmd
|
| | |
|
| | |
|
| | |
|
|/
|
| |
Closes #9909
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* propagate visual selection to textyankpost event
* adapt tests
* add docs
* also adapt oldtest
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| | |
- 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After cbc8d72fde4b19176028490934ff7a447afe523c when editing
the command in the command editing window (q:, q/, q?) it was possible
to switch to the previous tab. Doing so put Nvim in a bad state.
Moreover, switching tabs via the other available mechanisms (gt, gT,
<C-W>gt, <C-W>gT) is not possible when in the command editing window.
Here, the behavior is prevented. It is no longer possible to switch to
the previous tab when editing the command in the command editing window.
The solution is to share code between gt, gT, and g<Tab>. Specifically,
goto_tabpage_lastused now calls through goto_tabpage rather than
directly calling goto_tabpage_tp. Doing so works well because all the
validation enjoyed by gt and gT is present in goto_tabpage.
|
|
|
|
|
|
|
|
|
| |
In a multi-window scenario, it is possible to return focus to the last
accessed window via n_CTRL-W_p. However, in the case of a multi-tab
scenario, there was previously no way to return focus to the last
accessed *tab*. Here, that ability is added via n_g<tab>.
Additionally, the index of the previous tab is exposed via
tabpagenr('#'), mirroring the existing functionality of winnr('#').
|
| |
|
|
|
|
| |
close #11459
|
|
|
| |
fix #8428
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is better practice in general, and allows to remove the "helptags
ALL" hacks.
Ref: https://github.com/neovim/neovim/issues/8824
Ref: https://github.com/neovim/neovim/commit/f1b67c3453c
* Makefile: fix dependencies with regard to helptags
- use the file as the main target to avoid unnecessary triggering
- use "make oldtest" on Travis to ensure it gets built
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This extra retry() was removed (at my suggestion) in 5b94a2977a22, but
it is probably needed: jobwait(…, timeout=0) could return while
channel_process_exit_cb() is still queued (so TermClose event didn't
fire yet).
20:46:21,288 INFO - not ok 547 - TermClose event triggers when fast-exiting terminal job stops
20:46:21,288 INFO - # test/functional/autocmd/termclose_spec.lua @ 20
20:46:21,288 INFO - # Failure message: ./test/functional/helpers.lua:98: Vim:E121: Undefined variable: g:test_termclose
20:46:21,288 INFO - # stack traceback:
20:46:21,288 INFO - # ./test/functional/helpers.lua:98: in function 'eval'
20:46:21,288 INFO - # test/functional/autocmd/termclose_spec.lua:25: in function <test/functional/autocmd/termclose_spec.lua:20>
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Problem: delete-with-register dispatches TextYankPost before updating yank registers
Solution: Add flag to op_yank().
Fixes #10225
|
|
|
| |
Fixes https://github.com/neovim/neovim/issues/3757.
|
|
|
|
|
|
|
|
|
|
|
| |
stops" (#10377)
[ ERROR ]...neovim/neovim/test/functional/autocmd/termclose_spec.lua @ TermClose event triggers when fast-exiting terminal job stops
test/functional/helpers.lua:96: Vim(call):E900: Invalid channel id
stack traceback:
test/functional/helpers.lua:96: in function 'request'
test/functional/helpers.lua:254: in function 'command'
...neovim/neovim/test/functional/autocmd/termclose_spec.lua:23: in function <...neovim/neovim/test/functional/autocmd/termclose_spec.lua:20>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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()
|
|
|
|
|
| |
..which gets triggered when SIGUSR1 is sent to the nvim process.
Closes #9562
|