aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* WinClosed: sort auevents.lua; improve testsJustin M. Keyes2020-01-18
| | | | | - test: reduce verbosity, condense redundancy, improve readability - auevents.lua: keep events sorted by name. ref afd1d412fa91
* autocmd: WinClosed exposes window id as <afile>notomo2020-01-18
|
* autocmd: add WinClosed eventMarcos ALMEIDA2020-01-18
| | | | | | - only fire once, just before freeing mem - trigger when on a different buffer - avoid recursive calls in another tab
* messages: echo "line1\r\nline2" should not clear line1Björn Linse2020-01-16
|
* extmarks/bufhl: reimplement using new marktree data structureBjörn Linse2020-01-16
| | | | | | | | | | | | | | | | | | | | Add new "splice" interface for tracking buffer changes at the byte level. This will later be reused for byte-resolution buffer updates. (Implementation has been started, but using undocumented "_on_bytes" option now as interface hasn't been finalized). Use this interface to improve many edge cases of extmark adjustment. Changed tests indicate previously incorrect behavior. Adding tests for more edge cases will be follow-up work (overlaps on_bytes tests) Don't consider creation/deletion of marks an undoable event by itself. This behavior was never documented, and imposes complexity for little gain. Add nvim__buf_add_decoration temporary API for direct access to the new implementation. This should be refactored into a proper API for decorations, probably involving a huge dict. fixes #11598
* Add new marktree data structure for storing marksBjörn Linse2020-01-14
| | | | | | This is inspired by Atom's "marker index" data structure to efficiently adjust marks to text insertions deletions, but uses a wide B-tree (derived from kbtree) to keep the nesting level down.
* API: include invalid buffer/window/tabpage in error message (#11712)Daniel Hahler2020-01-14
|
* edit.c: Ensure undo sync when emulating <Esc>x #11706Matthew Malcomson2020-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | After PR #8226 an unmapped META key in insert mode behaves like ESC-<key> (:help i_META). The behaviour does not fully match, since if <Esc>-<key> is pressed manually then since it were pressed manually `gotchars` would be called on the second <key> after insert-mode had already been left. This would mean that `may_sync_undo` (called from `gotchars`) would call `u_sync(FALSE)` on the second key (since we would be in normal mode). This overall means that <Meta-[something]> behaves differently with respect to undo than <Esc>[something] when the [something] makes a change. As an example, under `nvim -u NONE`: ihello<M-.>u leaves the buffer empty, while ihello<Esc>.u leaves the buffer with one instance of `hello`. - Fix by calling u_sync() manually in the new clause under `normalchar:` in `insert_handle_key`. - Update test in tui_spec.lua that accidentally relied on the old behaviour.
* tabpage: disallow go-to-previous in cmdline-win #11692butwerenotthereyet2020-01-09
| | | | | | | | | | | | | | 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.
* LSP: highlight groups test, docJustin M. Keyes2020-01-08
|
* test: hoist buf_lines()Justin M. Keyes2020-01-08
|
* test: just say no to hyper-granularityJustin M. Keyes2020-01-08
| | | | | - Move plugin/lsp/* to plugin/* - Merge lsp/util_spec.lua into lsp_spec.lua
* API: nvim_get_hl_by_id: omit hl instead of returning -1 #11685kevinhwang912020-01-08
| | | | | | | | | Problem: When Normal highlight group defines ctermfg/bg, but other highlight group lacks ctermfg/bg, nvim_get_hl_by_id(hl_id, v:false) returns -1 for the missing ctermfg/bg instead of just omitting it. Solution: checking for -1 in hlattrs2dict() fix #11680
* vim-patch:8.1.1308: the Normal highlight is not defined when compiled with GUIJan Edmund Lazo2020-01-06
| | | | | | Problem: The Normal highlight is not defined when compiled with GUI. Solution: Always define Normal. (Christian Brabandt, closes vim/vim#4072) https://github.com/vim/vim/commit/f90b6e03a983b62b66564fc449e32724d6456769
* vim-patch:8.1.1579: dict and list could be GC'ed while displaying errorJan Edmund Lazo2020-01-05
| | | | | | | | | Problem: Dict and list could be GC'ed while displaying error in a timer. (Yasuhiro Matsumoto) Solution: Block garbage collection when executing a timer. Add test_garbagecollect_soon(). Add "no_wait_return" to test_override(). (closes vim/vim#4571) https://github.com/vim/vim/commit/adc6714aac20f5462a0ecec50ab4806b2f3ab0db
* vim-patch:8.1.0974: cannot switch from terminal window to previous tabpageWe're Yet2020-01-03
| | | | | | Problem: Cannot switch from terminal window to previous tabpage. Solution: Make CTRL-W gT move to previous tabpage. https://github.com/vim/vim/commit/882d02eeb571a13a502fe82a04c9eaffa630c294
* vim-patch:8.1.0972: cannot switch from terminal window to next tabpageWe're Yet2020-01-03
| | | | | | Problem: Cannot switch from terminal window to next tabpage. Solution: Make CTRL-W gt move to next tabpage. https://github.com/vim/vim/commit/72e83c1ae535e2ebc35b114d34d0a811eb62b068
* tabpage: track last-used tabpage #11626butwerenotthereyet2020-01-02
| | | | | | | | | 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('#').
* lua: metatable for empty dict valueBjörn Linse2020-01-01
|
* Merge #11642 'CI: test powershell core'Justin M. Keyes2020-01-01
|\
| * ci: test powershell core on LinuxJan Edmund Lazo2019-12-31
| |
* | LSP: eliminate lsp.stop_all_clients()Justin M. Keyes2019-12-31
| | | | | | | | | | | | Reduce API surface. We don't need so many variations of functions. Too many functions means verbose, largely redundant documentation, tests, and cognitive burden.
* | doc [ci skip]Justin M. Keyes2019-12-31
|/
* ui: add basic tests for pumheight,pumwidthJan Edmund Lazo2019-12-29
|
* vim-patch:8.1.0554: popup menu overlaps with preview windowJan Edmund Lazo2019-12-29
| | | | | | | | Problem: Popup menu overlaps with preview window. Solution: Adjust the height computation. (Hirohito Higashi, closes vim/vim#3414) https://github.com/vim/vim/commit/614ab8aa00346724bfc27980d25985d482269b75 Cherry-picked "row -> pum_win_row" rename changes from patch 8.1.0062.
* vim-patch:8.0.1538: popupmenu is too far left when completion is longJan Edmund Lazo2019-12-29
| | | | | | Problem: Popupmenu is too far left when completion is long. (Linwei) Solution: Adjust column computations. (Hirohito Higashi, closes vim/vim#2661) https://github.com/vim/vim/commit/bb008dd3239c5fe3ac04501e38e4c950fa9426c8
* vim-patch:8.0.1491: the minimum width of the popup menu is hard codedJan Edmund Lazo2019-12-29
| | | | | | | Problem: The minimum width of the popup menu is hard coded. Solution: Add the 'pumwidth' option. (Christian Brabandt, James McCoy, closes vim/vim#2314) https://github.com/vim/vim/commit/a8f04aa275984183bab5bb583b128f38c64abb69
* Revert "runtime: Add vim.lsp.get_client_by_name" #11623Ashkan Kiani2019-12-29
| | | reverts 680693e263576e34d5947c43ab0ae3ff0ebfeab5 #11603
* runtime: Add vim.lsp.get_client_by_name (#11603)Hirokazu Hata2019-12-28
| | | | Since the client name is more obvious than the client id for the user, add an API to get the lsp client by the client name.
* LSP: Fix flaky test #11618Ashkan Kiani2019-12-27
|
* Merge #11568 'fillchars: foldopen, foldsep, foldclose'Justin M. Keyes2019-12-26
|\
| * fillchars: adding foldopen, foldsep, foldcloseMatthieu Coudron2019-12-25
| | | | | | | | | | You can try it with set fillchars+=foldopen:▾,foldsep:│,foldclose:▸
* | system(), jobstart(): raise error on non-executable #11234Daniel Hahler2019-12-24
|/ | | | | | | | | | * tv_to_argv: error when cmd is not executable Callers always assume that emsg was emitted: - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L12509 - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L17923 - https://github.com/neovim/neovim/blob/57fbf288/src/nvim/eval.c#L18202 * test/functional/provider: display reason from missing_provider * provider#node#Detect: skip / handle non-existing node executable
* Merge pull request #11113 from bfredl/tree-sitter-queryBjörn Linse2019-12-22
|\ | | | | tree-sitter step 2: query API and highlighting prototype
| * tree-sitter: implement query functionality and highlighting prototype ↵Björn Linse2019-12-22
| | | | | | | | [skip.lint]
* | tests: ex_terminal_spec: retry ":terminal (with fake shell)" (#11588)Daniel Hahler2019-12-22
|/ | | | | | | | | | | | | | | | | | | | | | | Flaky failure (Travis CI, macOS): [ RUN ] :terminal (with fake shell) works with gf: 10518.41 ms FAIL test/functional/terminal/ex_terminal_spec.lua:248: Row 1 did not match. Expected: |*^ready $ echo "scripts/shadacat.py" | |* | |*[Process exited 0] | |:terminal echo "scripts/shadacat.py" | Actual: |*^ | |*[Process exited 0] | |* | |:terminal echo "scripts/shadacat.py" | To print the expect() call that would assert the current screen state, use screen:snapshot_util(). In case of non-deterministic failures, use screen:redraw_debug() to show all intermediate screen states. stack traceback: test/functional/ui/screen.lua:579: in function '_wait' test/functional/ui/screen.lua:361: in function 'expect' test/functional/terminal/ex_terminal_spec.lua:248: in function <test/functional/terminal/ex_terminal_spec.lua:245>
* TUI: can make the cursor transparent #11519Matthieu Coudron2019-12-19
| | | when setting 'guicursor' highlight blend=100.
* vim-patch:8.2.0010: test64 is old styleJan Edmund Lazo2019-12-16
| | | | | | Problem: Test64 is old style. Solution: Convert to new style test. (Yegappan Lakshmanan, closes vim/vim#5363) https://github.com/vim/vim/commit/f9cb05c14753d984f002c0c090688f8510147e6b
* Merge pull request #7202 from teto/jobstart_envJames McCoy2019-12-13
|\ | | | | [RFC] override environment for jobstart
| * Add negative test for type of job's env optionJames McCoy2019-12-12
| |
| * test: new test for setting environmentMatthieu Coudron2019-12-11
| |
| * test: always pass a string to expect_msg_seqMatthieu Coudron2019-12-03
| | | | | | | | Seems like pcall doesn't always return a string as a 2nd element of the tuple.
* | jumplist: browser-style (or 'tagstack') navigation #11530butwerenotthereyet2019-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Traditionally, when navigating to a specific location from the middle of the jumplist results in shifting the current location to the bottom of the list and adding the new location after it. This behavior is not desireable to all users--see, for example https://vi.stackexchange.com/questions/18344/how-to-change-jumplist-behavior. Here, another jumplist behavior is introduced. When jumpoptions (a new option set added here) includes stack, the jumplist behaves like the tagstack or like history in a web browser. That is, when navigating to a location from the middle of the jumplist 2 first 1 second 0 third <-- current location 1 fourth 2 fifth to a new location the locations after the current location in the jump list are discarded 2 first 1 second 0 third <-- current location The result is that when moving forward from that location, the new location will be appended to the jumplist: 3 first 2 second 1 third 0 new If the new location is the same new == second as some previous (but not immediately prior) entry in the jumplist, 2 first 1 second 0 third <-- current location 1 fourth 2 fifth both occurrences preserved 3 first 2 second 1 third 0 second (new) when moving forward from that location. It would be desireable to go farther and, when the new location is the same as the location that is currently next in the jumplist, new == fourth make the result of navigating to the new location by jumping (e.g. 50gg) be the same as moving forward in the jumplist 2 first 1 second 0 third 1 new <-- current location 2 fifth and simply increment the jumplist index. That change is NOT part of this patch because it would require passing the new cursor location to the function (setpcmark) from all of its callees. That in turn would require those callees to know *before* calling what the new cursor location is, which do they do not currently.
* | Fix access on vim.wo (#11517)Ashkan Kiani2019-12-07
| | | | | | * Add more tests for vim.wo
* | defaults: set nostartofline (#11135)Justin M. Keyes2019-12-03
|\ \ | |/ |/| | | | | | | Having the cursor change column can be surprising. Force startofline in functional and old tests. Remove the functional breakindent test, as it's a subset of the oldtest one.
| * defaults: set nostartoflineMatthieu Coudron2019-12-03
| | | | | | | | | | | | | | Having the cursor change column can be surprising. Force startofline in functional and old tests. Remove the functional breakindent test, as it's a subset of the oldtest one.
* | API: rename nvim_execute_lua => nvim_exec_luaJustin M. Keyes2019-12-02
| | | | | | | | | | | | - We already find ourselves renaming nvim_execute_lua in tests and scripts, which suggests "exec" is the verb we actually want. - Add "exec" verb to `:help dev-api`.
* | API: deprecate nvim_command_outputJustin M. Keyes2019-12-02
| |
* | log_init: call log_path_init (#11501)Daniel Hahler2019-12-02
| | | | | | | | | | | | | | | | This has to be done after `init_homedir` for XDG default and `set_init_1` for lookup from env, which could be done earlier likely (to help with https://github.com/neovim/neovim/issues/10937), but this keeps it in sync with Vim. Fixes https://github.com/neovim/neovim/issues/11499.
* | oldtest: support for running by filename (#11473)Daniel Hahler2019-12-02
| | | | | | | | | | | | | | | | | | | | | | | | Follow-up to 8969efca8 (Vim patch 8.1.0723) NOTE: This changes the main entrypoint for running single oldtest files to not use/require the ".res" extension anymore. But it is handled for B/C. Adds a phony rule to run oldtest by filename. Not going through "$(MAKE)" avoids GNUmakefile being used then (which I use for WIP things), and it seems like SINGLE_MAKE should be used anyway probably.