aboutsummaryrefslogtreecommitdiff
path: root/test/functional/autocmd
Commit message (Collapse)AuthorAge
...
* autocmds: TermEnter, TermLeave #8550Usama Hameed2019-09-14
| | | fix #8428
* test: Rename meth_pcall to pcall_errJustin M. Keyes2019-09-06
| | | | | | | - 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.
* tests: use runtime from build for doc/tags with :help (#10479)Daniel Hahler2019-08-28
| | | | | | | | | | | | 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
* tests: fix flaky "TermClose … fast-exiting terminal job stops"Justin M. Keyes2019-08-05
| | | | | | | | | | | | | | 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>
* :doautocmd : Never show "No matching autocommands" #10689Justin M. Keyes2019-08-05
| | | | | | | | 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
* TextYankPost: spurious/too-early dispatch during delete #10392Jit2019-07-29
| | | | | | Problem: delete-with-register dispatches TextYankPost before updating yank registers Solution: Add flag to op_yank(). Fixes #10225
* Fix missing CursorHoldI events (#3758)Daniel Hahler2019-07-16
| | | Fixes https://github.com/neovim/neovim/issues/3757.
* tests: fix flaky "TermClose event triggers when fast-exiting terminal job ↵Daniel Hahler2019-07-02
| | | | | | | | | | | 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>
* messages: use proper multiline error message for rpcrequest and API wrappersBjörn Linse2019-05-26
|
* refactor: introduce XFREE_CLEAR()Justin M. Keyes2019-05-25
| | | | | | | | | | | | | | | 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
* autocmd: fixes and tests for autocmd window issuesBjörn Linse2019-05-13
| | | | | | - 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.
* cursormoved: add tests for CursorMovedMarco Hinz2019-03-29
|
* autocmd: do not show empty section after ++once handlers expireJustin M. Keyes2019-03-14
| | | | | | | 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.
* autocmd: rename: "++nested", "++once"Justin M. Keyes2019-03-14
| | | | | Based on feedback from upstream: https://github.com/vim/vim/pull/4100
* TextYankPost: add v:event["inclusive"] #9717Justin M. Keyes2019-03-13
|
* autocmd: rename "once" => "-once" #9713Justin M. Keyes2019-03-11
| | | | | | | - 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
* autocmd: introduce "once" featureJustin M. Keyes2019-03-10
| | | | | | | | | | | | | | | | 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()
* events: add "Signal" event #9564Marco Hinz2019-02-04
| | | | | ..which gets triggered when SIGUSR1 is sent to the nvim process. Closes #9562
* cmdline: support v:event in CmdlineChangedBjörn Linse2018-12-12
|
* preserve_exit: Ignore SIGHUPJustin M. Keyes2018-11-27
| | | | | | | | | | | | | | | | | closes #9274 ref #9028 If stdin closed then read_error_exit calls preserve_exit. Handling SIGHUP during preserve_exit would cause a premature teardown, and conflicts with e.g. ui_bridge_stop which waits for TUI to teardown. Vim ignores SIGHUP in its prepare_to_exit and getout_preserve_modified routines: /* Ignore SIGHUP, because a dropped connection causes a read error, which * makes Vim exit and then handling SIGHUP causes various reentrance * problems. */ signal(SIGHUP, SIG_IGN);
* job-control: children_kill_cb(): do not check elapsed timeJustin M. Keyes2018-04-15
| | | | | | | | | 1. Don't check elapsed time in children_kill_cb(), it's already implied by the start-time of the timer itself. 2. Restart timer from children_kill_cb() for PTY jobs, to send SIGKILL after SIGTERM. There is an edge case where SIGKILL might follow SIGTERM too quickly, if jobstop() is called near the 2-second timer window. But this edge case is not worth code complication.
* msg: do not scroll entire screen (#8088)Björn Linse2018-03-31
|
* test: use luv.now() instead of os.time()Justin M. Keyes2018-03-16
|
* DirChanged: support <buffer> (#8140)Marco Hinz2018-03-16
|
* test: rename next_message() to next_msg()Justin M. Keyes2018-03-11
|
* test: win: enable termclose_spec.luaJan Edmund Lazo2018-02-19
|
* vim-patch-8.0.0649 and vim-patch-8.0.0650: autocmd open help 2 timesNimit Bhardwaj2018-02-17
|
* api: change nvim_command_output behaviorJustin M. Keyes2018-01-10
| | | | | | | | | | | | | | | | | | | Implement nvim_command_output with `execute({cmd},"silent")`. Behavior changes: - does not provoke any hit-enter prompt - no longer prepends a newline char - does not capture some noise (like the "[New File]" message, see the change to tabnewentered_spec.lua) Technically ("bug-for-bug") this a breaking change. But the previous behavior of nvim_command_output meant that it probably wasn't used for anything outside of tests. Also remove the undocumented `v:command_output` variable which was a hack introduced only for the purposes of nvim_command_output. closes #7726
* tests: termclose_spec: fix flaky SIGTERM test #7787Daniel Hahler2017-12-30
| | | | | Followup to https://github.com/neovim/neovim/pull/7217. Build failure: https://travis-ci.org/neovim/neovim/jobs/322930672#L2958.
* Merge #7782 'Fix TabClose autocommand via close_windows'Justin M. Keyes2017-12-30
|\
| * Move applying of TabClosed to win_close_othertabDaniel Hahler2017-12-29
|/
* window.c: do BufEnter in correct window after closing help #7431glacambre2017-12-10
| | | | | | | | | | | | closes #7429 Problem: after a help window was closed, a window was selected and its autocommands triggered. After that, restore_snapshot was called and the focused window changed, confusing the user. Solution: Add function get_snapshot_focus() that returns the window that holds the cursor in a snapshot. Use this function in win_close to make sure the right window is selected before any autocommand is triggered.
* FIXUP: duplicate error number in #7422Björn Linse2017-11-23
|
* cmdline: CmdlineEnter and CmdlineLeave autocommands (#7422)Björn Linse2017-11-22
| | | | | | | | | | vim-patch:fafcf0dd59fd patch 8.0.1206: no autocmd for entering or leaving the command line Problem: No autocmd for entering or leaving the command line. Solution: Add CmdlineEnter and CmdlineLeave. https://github.com/vim/vim/commit/fafcf0dd59fd9c4ef743bb333ae40d1d322b6079
* ci: XXX: permissive termclose_spec timer (#7217)Matthieu Coudron2017-08-26
| | | | We probably need to revisit the process_stop() logic. In the meantime this hack avoids CI noise.
* jobstop/process_stop: send SIGTERM directlyDaniel Hahler2017-07-07
| | | | | This reverts the revert of #6644 (7c1a5d1d4), and handles it properly now (with tests).
* functests: Fix linter errorsZyX2017-04-09
|
* functests: Replace execute with either command or feed_commandZyX2017-04-09
| | | | | | | | | | Hope this will make people using feed_command less likely: this hides bugs. Already found at least two: 1. msgpackparse() will show internal error: hash_add() in case of duplicate keys, though it will still work correctly. Currently silenced. 2. ttimeoutlen was spelled incorrectly, resulting in option not being set when expected. Test was still functioning somehow though. Currently fixed.
* functests: Move test from legacy/009 to autocmd/autocmdZyX2017-04-08
|
* test: retry() works with asserts; error() not required.Justin M. Keyes2017-04-06
|
* test/termclose: Avoid indeterminism (#6281)Justin M. Keyes2017-03-15
|
* DirChanged: avoid redundant events on 'autochdir'Justin M. Keyes2017-03-12
|
* DirChanged: trigger when switching scopesJustin M. Keyes2017-03-12
| | | | Closes #6054
* DirChanged: Publish _after_ updating win/tab CWD.Justin M. Keyes2017-03-12
| | | | | | So getcwd() works correctly during DirChanged event. Closes #6260
* terminal: Keep cursor position.Justin M. Keyes2017-03-01
| | | | | | Let the terminal dictate the normal-mode cursor position. This will be disorienting sometimes, but it is closer to what users expect vs always going to the last line.
* DirChanged: set <amatch> (#5961)Justin M. Keyes2017-01-17
| | | | | Also: - test that DirChanged is not recursive - fix 'not trigger if :cd fails' test on Windows
* Merge #5928 'New event: DirChanged'Marco Hinz2017-01-16
|\
| * Add autocmd/dirchanged_spec.luaMarco Hinz2017-01-13
| |
* | Merge #5918 'vim-patch: 7.4.2006, 7.4.2075, 7.4.2077, 7.4.2117, 7.4.2300, ↵Justin M. Keyes2017-01-16
|\ \ | |/ |/| | | 7.4.2313, 7.4.2314'.
| * fix test failurelonerover2017-01-09
| |