aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
...
* | fix(logging): skip recursion, fix crash #18764Justin M. Keyes2022-05-30
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 1. The main log routine does not protect itself against recursion. log_lock() doesn't guard against recursion, it would deadlock... 2. 22b52dd462e5 (#11501) regressed 6f27f5ef91b3 (#10172), because set_init_1..process_spawn tries to log (see backtrace below), but the mutex isn't initialized yet. Even if the mutex were valid, we don't want early logging to fallback to stderr because that can break embedders when stdio is used for RPC. frame 1: 0x00000001001d54f4 nvim`open_log_file at log.c:205:7 frame 2: 0x00000001001d5390 nvim`logmsg(log_level=1, context="UI: ", func_name=0x0000000000000000, line_num=-1, eol=true, fmt="win_viewport") at log.c:150:20 frame : 0x000000010039aea2 nvim`ui_call_win_viewport(grid=2, win=1000, topline=0, botline=1, curline=0, curcol=0, line_count=1) at ui_events_call.generated.h:321:3 frame 4: 0x00000001003dfefc nvim`ui_ext_win_viewport(wp=0x0000000101816400) at window.c:939:5 frame 5: 0x00000001003ec5b4 nvim`win_ui_flush at window.c:7303:7 frame 6: 0x00000001003a04c0 nvim`ui_flush at ui.c:508:3 frame 7: 0x00000001002966ba nvim`do_os_system(argv=0x0000600000c0c000, input=0x0000000000000000, len=0, output=0x0000000000000000, nread=0x00007ff7bfefe830, silent=false, forward_output=false) at shell.c:894:3 frame 8: 0x0000000100295f68 nvim`os_call_shell(cmd="unset nonomatch; vimglob() { while [ $# -ge 1 ]; do echo \"$1\"; shift; done }; vimglob >/var/folders/gk/3tttv_md06987tlwpyp62jrw0000gn/T/nvimwwvwfD/0 ~foo", opts=kShellOptExpand | kShellOptSilent | kShellOptHideMess, extra_args=0x0000000000000000) at shell.c:663:18 frame 9: 0x0000000100295845 nvim`call_shell(cmd="unset nonomatch; vimglob() { while [ $# -ge 1 ]; do echo \"$1\"; shift; done }; vimglob >/var/folders/gk/3tttv_md06987tlwpyp62jrw0000gn/T/nvimwwvwfD/0 ~foo", opts=kShellOptExpand | kShellOptSilent | kShellOptHideMess, extra_shell_arg=0x0000000000000000) at shell.c:712:14 frame 10: 0x0000000100294c6f nvim`os_expand_wildcards(num_pat=1, pat=0x00007ff7bfefeb20, num_file=0x00007ff7bfefee58, file=0x00007ff7bfefee60, flags=43) at shell.c:328:7 ... frame 23: 0x000000010028ccef nvim`expand_env_esc(srcp=",~foo", dst="~foo", dstlen=4094, esc=false, one=false, prefix=0x0000000000000000) at env.c:673:17 frame 24: 0x000000010026fdd5 nvim`option_expand(opt_idx=29, val=",~foo") at option.c:1950:3 frame 25: 0x000000010026f129 nvim`set_init_1(clean_arg=false) at option.c:558:19 frame 26: 0x00000001001ea25e nvim`early_init(paramp=0x00007ff7bfeff5f0) at main.c:198:3 frame 27: 0x00000001001ea6bf nvim`main(argc=1, argv=0x00007ff7bfeff848) at main.c:255:3 Solution: 1. Check for recursion, show "internal error" message. - FUTURE: when "remote TUI" is merged, can we remove log_lock()? 2. Skip logging if log_init wasn't called yet.
* Merge pull request #18792 from famiu/feat/nvim_create_user_command/smodsbfredl2022-05-29
|\ | | | | feat(api): pass structured modifiers to commands
| * feat(nvim_create_user_command): pass structured modifiers to commandsFamiu Haque2022-05-29
| | | | | | | | | | | | | | Adds an `smods` key to `nvim_create_user_command` Lua command callbacks, which has command modifiers but in a structured format. This removes the need to manually parse command modifiers. It also reduces friction in using `nvim_cmd` inside a Lua command callback.
* | test: add tests for inccommand with c_CTRL-R_= and c_CTRL-\_e (#18796)zeertzjq2022-05-29
| |
* | fix(winbar): set w_winrow_off when initializing firstwin size (#18793)zeertzjq2022-05-29
| |
* | test(job_spec): remove Xtest_jobstart_env log filezeertzjq2022-05-29
| |
* | test: fixeol cleanup created files #18785Javier Lopez2022-05-28
|/ | | | | The async nature of feed_command caused a race condition on the calls to delete, leaving the files on the root of the repo. Just use os.remove and no need to wipeout.
* fix(winbar): only allow adding winbar when there is spaceFamiu Haque2022-05-28
|
* fix(winbar): fix winbar disappear or glitch when moving a split (#18775)zeertzjq2022-05-28
|
* test(unit): use setup()/teardown() in buffer_spec.lua (#18739)Jun-ichi TAKIMOTO2022-05-28
|
* fix(ui): require window-local value to show winbar on floating windows (#18773)Famiu Haque2022-05-28
| | | | | | | Previously, there was a bug where setting the local value of 'winbar' to itself would cause winbar to appear on a floating window, which is undesirable. This fix makes it so that it's explicitly required for the window-local value of 'winbar' for a floating window to be set in order for winbar to be shown on that window.
* Merge pull request #18306 from lewis6991/fnfastbfredl2022-05-26
|\ | | | | feat(lua): allow some viml functions to run in fast
| * fixup: update test/functional/lua/vim_spec.luaLewis Russell2022-05-17
| | | | | | Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
| * feat(lua): allow some viml functions to run in fastLewis Russell2022-05-17
| | | | | | | | | | This change adds the necessary plumbing to annotate functions in funcs.c as being allowed in run in luv fast events.
* | Merge pull request #18528 from lewis6991/setwinoptbfredl2022-05-25
|\ \ | | | | | | feat(api): add `win` and `buf` to `nvim_set_option_value`
| * | feat(api): add win and buf to nvim_set_option_valueLewis Russell2022-05-17
| |/ | | | | | | Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
* | feat: click support for 'statusline', 'winbar' #18650Famiu Haque2022-05-23
| | | | | | | | The mouseclick item "%@" is now supported by 'statusline' and 'winbar'. Previously it was only supported by 'tabline'.
* | refactor!: delete insertmode (#18547)Gregory Anders2022-05-22
| | | | | | | | | | | | | | Neovim already removed `evim` (or any similar flags). The 'insertmode' option is a weird remnant, so get rid of it. The 'insertmode' option is replaced with a script that closely emulates the option. This script is documented at :help 'insertmode'
* | fix(winbar): allow winbar to display the rulerbfredl2022-05-22
| |
* | fix(mksession): don't store floats in session #18635Daniel Steinberg2022-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: If there are floating windows when `:mksession` runs, the session cannot be properly restored. Solution: Change `:mksession` to skip floating windows. This matches Vim's treatment of popup windows. An alternative approach could have `:mksession` save floating windows that can be _properly_ restored (rather than skip them entirely, which is what this PR does). While that would seemingly be a more complete fix, that could present additional issues since floating windows are ordinarily created by plugins, and they may no longer be properly under a plugin's control when restored. closes #18432
* | Merge pull request #18696 from bfredl/quickincbfredl2022-05-22
|\ \ | | | | | | fix(tests): fix some issues with ui/inccommand_spec.lua causing slowness
| * | fix(tests): fix some issues with ui/inccommand_spec.lua causing slownessbfredl2022-05-22
| | | | | | | | | | | | | | | | | | | | | | | | from ~30 to ~20 secs with ASAN build - feedkeys test: the same substitute was repeated, and not even correctly spelled - don't clear() in a tight loop. "bwipe!" is enough to erase undo history - error in cnoremap mapping causes a check_for_delay(). <c-c> it away.
* | | Merge pull request #18693 from bfredl/quicklspbfredl2022-05-22
|\ \ \ | |/ / |/| | fix(ci): remove 2000ms blocking wait in many plugin/lsp_spec.lua tests
| * | fix(ci): remove 2000ms blocking wait in many plugin/lsp_spec.lua testsbfredl2022-05-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cuts down typical run time for `plugin/lsp_spec.lua` from 70 secs to 12 secs in ASAN CI build. This happens in ASAN/EXIT_FREE builds where nvim waits 2000ms due to unclosed handled. I wasn't able to pin-point the exact cause. But these tests ran in nested context where two server/client pairs were setup for no good reason. Moving these tests out so only one client is being setup fixed the exit hang.
* | | fix(folds): fix fold regression with :move (#18685)zeertzjq2022-05-22
| | |
* | | Merge pull request #18681 from bfredl/uitestbfredl2022-05-22
|\ \ \ | |/ / |/| | fix(tests): fix some screen.lua warnings
| * | fix(tests): fix some screen.lua warningsbfredl2022-05-21
| | |
* | | feat(ui): clear message history explicitly with msg_history_clear eventdevbhan singh2022-05-21
|/ /
* | fix(autocmds): separate command from desc (#18617)kylo2522022-05-21
| |
* | fix(unittests): coredump when running unit tests #18663Jun-ichi TAKIMOTO2022-05-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fs_init() must be called before early_init() in init/helpers.lua If I run 'make unittest' on my Mac (macOS 10.14/Mojave or 12/Big Sur, intel CPU), every test produce a core dump. Call sequence in the core is: early_init() main.c:197 set_init_1() option.c:508 runtimepath_default() runtime.c:1205 get_lib_dir() runtime.c:1175 os_isdir() fs.c:137 os_getperm() fs.c:777 os_stat() fs.c:761 fs_loop_lock() fs.c:72 uv_mutex_lock(&fs_loop_mutex) thread.c:352 abort() .deps/build/src/libuv/src/unix/thread.c: void uv_mutex_lock(uv_mutex_t* mutex) { if (pthread_mutex_lock(mutex)) abort(); // line 352 } So pthread_mutex_lock(&fs_loop_mutex) failed. The reason seems to be simple. fs_init() was not called and fs_loop_mutex has not been initialized. fs_init() was moved out from early_init() in main.c by b87867e69e94d9784468a126f21c721446f080de, but unit/helpers.lua was not updated accordingly.
* | refactor: move reverse_text to strings.c as it's a string operationDundar Goc2022-05-20
| | | | | | | | | | | | Also add tests for reverse_text. Co-authored-by: Kalle Ranki <kalle.ranki@gmail.com>
* | Merge pull request #18641 from famiu/fix/nvim_cmd/keymap_error_suppressbfredl2022-05-20
|\ \ | | | | | | fix: make `nvim_cmd` not suppress errors inside key mapping
| * | fix: make `nvim_cmd` not suppress errors inside key mappingFamiu Haque2022-05-19
| | | | | | | | | | | | Closes #18632
* | | Merge pull request #18629 from famiu/fix/ui/winbarbfredl2022-05-19
|\ \ \ | | | | | | | | fix(ui): make `winbar` properly equalize window heights for local value
| * | | fix(ui): make `winbar` properly equalize window heights for local valueFamiu Haque2022-05-19
| | | | | | | | | | | | | | | | | | | | Fixes `'winbar'` not properly equalizing window heights for splits when the global value is empty and a window-local value is set instead.
* | | | fix(mouse): fix mouse drag position with winbar or border in multigridzeertzjq2022-05-19
| | | |
* | | | fix(mouse): fix mouse drag position with winbarzeertzjq2022-05-19
| |/ / |/| |
* | | test(mksession_spec): only sleep on Windows (#18637)zeertzjq2022-05-19
| | |
* | | fix(termopen): avoid ambiguity in URI when CWD is root dir (#16988)zeertzjq2022-05-19
| | |
* | | Merge pull request #18620 from bfredl/multibarbfredl2022-05-18
|\ \ \ | | | | | | | | fix(ui): make winbar work with floats and multigrid
| * | | fix(ui): make winbar work with floats and multigridbfredl2022-05-18
| | | |
* | | | Merge pull request #18507 from gpanders/au-lsp-attachedGregory Anders2022-05-18
|\ \ \ \
| * | | | feat(lsp): add LspAttach and LspDetach autocommandsGregory Anders2022-05-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current approach of using `on_attach` callbacks for configuring buffers for LSP is suboptimal: 1. It does not use the standard Nvim interface for driving and hooking into events (i.e. autocommands) 2. There is no way for "third parties" (e.g. plugins) to hook into the event. This means that *all* buffer configuration must go into the user-supplied on_attach callback. This also makes it impossible for these configurations to be modular, since it all must happen in the same place. 3. There is currently no way to do something when a client detaches from a buffer (there is no `on_detach` callback). The solution is to use the traditional method of event handling in Nvim: autocommands. When a LSP client is attached to a buffer, fire a `LspAttach`. Likewise, when a client detaches from a buffer fire a `LspDetach` event. This enables plugins to easily add LSP-specific configuration to buffers as well as enabling users to make their own configurations more modular (e.g. by creating multiple LspAttach autocommands that each do something unique).
* | | | | Merge pull request #18624 from famiu/feat/ui/winbarbfredl2022-05-18
|\ \ \ \ \ | |/ / / / |/| | / / | | |/ / | |/| | fix(ui): set correct position on mouse click when 'winbar' is enabled
| * | | fix(ui): set correct position on mouse click when 'winbar' is enabledFamiu Haque2022-05-18
| |/ /
* / / feat(api): enable nvim_exec_autocmds to pass arbitrary data (#18613)Gregory Anders2022-05-18
|/ / | | | | | | Add a "data" key to nvim_exec_autocmds that passes arbitrary data (API objects) to autocommand callbacks.
* | Merge pull request #18562 from famiu/feat/ui/winbarbfredl2022-05-18
|\ \ | | | | | | feat(ui): add `'winbar'`
| * | feat(ui): add `'winbar'`Famiu Haque2022-05-18
| |/ | | | | | | | | | | | | Adds support for a bar at the top of each window, enabled through the `'winbar'` option. Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
* | test: fix mksession terminal CWD test again (#18615)zeertzjq2022-05-18
| |
* | test: unskip tests on Windows (#18600)zeertzjq2022-05-18
| | | | | | | | | | | | Remove the command('qall!') from mksession_spec.lua because it prevents helpers.rmdir() from retrying. Allow extra trailing spaces when matching terminal lines.