aboutsummaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* Merge pull request #16762 from zeertzjq/grid-truncate-pum-double-widthBjörn Linse2021-12-25
|\ | | | | Truncate double-width character at the end of popup menu correctly
| * fix(pum_redraw): use grid_puts_len() to truncate the textzeertzjq2021-12-24
| | | | | | | | | | | | | | | | | | | | | | Nvim already resizes grid to the required width, so there is no need to truncate the text in pum_redraw(). What's more, truncation is currently done incorrectly because Vim patch 8.2.1995 was ported incorrectly. This nearly reverts the truncation part of Vim patch 8.2.1995, but not the part that reduces unnecessary calls to pum_redraw(). The original PR https://github.com/vim/vim/pull/7306 didn't explain much about which part of it actually reduces redraws.
* | fix(options): disallow empty 'fdc' and 'scl' (#16765)Sean Dewar2021-12-24
|/ | | | | | | | | Empty string values for these options aren't actually allowed, but check_opt_strings allows empty string options. It so happens that 'scl' handles empty string like "auto", but empty 'fdc' causes glitchiness (win_fdccol_count returns an incorrect value). Just disallow empty string values for these options completely.
* fix(api): make nil value in nvim_set_option_value clear local value (#16710)Gregory Anders2021-12-21
| | | | For special options such as 'undolevels' and 'scrolloff', this sets the local value to the special "unset" value (e.g. -12345 for 'undolevels').
* feat(lsp): add buf_detach_client (#16250)Michael Lingelbach2021-12-21
| | | | | This allows the user to detach an active buffer from the language client. If no clients remain attached to a buffer, the on_lines callback is used to cancel nvim_buf_attach.
* fix: update last cursor on first CursorMoved (#16698)Michael Lingelbach2021-12-18
| | | | | | | | | | | | | | | | | | | | Closes https://github.com/neovim/neovim/issues/16625 https://github.com/neovim/neovim/issues/12923 The first defined CursorMoved autocommand will immediately fire if the cursor has previously moved upon definition of the autocommand. Plugins add dummy autocommands such as: ```lua autocmd CursorMoved * execute '' ``` to avoid this behavior. Instead, when defining a new CursorHold autocommand, force update the last cursor position. See https://github.com/vim/vim/issues/2053
* Merge pull request #16294 from zeertzjq/test-fewest-iterationJames McCoy2021-12-18
|\ | | | | test: require fewest number of main loop iterations possible
| * test: require fewest number of main loop iterations possiblezeertzjq2021-11-15
| | | | | | | | | | Change exc_exec to pcall_err to reduce one main loop iteration. No need to call poke_eventloop() unless after nvim_input().
* | Merge pull request #16707 from jamessan/filter-out-testsJames McCoy2021-12-18
|\ \ | | | | | | test: allow excluding functional/unti tests using TEST_FILTER_OUT
| * | test: allow excluding functional/unit tests using TEST_FILTER_OUTJames McCoy2021-12-18
| | | | | | | | | | | | | | | | | | | | | Although this can already be done using `BUSTED_ARGS`, it complements our existing shortcut of `TEST_FILTER.` [skip ci]
* | | feat(runtime): new checkhealth filetype (#16660)matveyt2021-12-18
|/ /
* | autocmd: RecordingEnter, RecordingLeave (#16684)Gregory Anders2021-12-18
|\ \
| * | feat(autocmd): add Recording autocmdsThomas Vigouroux2021-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | feat(eval): add reg_recorded() This function is used the get the last recorded register. style(Recording): rename handler to match suggestions fix(RecordingLeave): send autocommand earlier This makes the autocommand fire just before setting reg_recorded to reg_recording, this way we clearly show that we are actually just before actually quitting the recording mode.
* | | fix(lsp): correctly align start and end range to codepoints during ↵Rishikesh Vaishnav2021-12-17
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | incremental sync (#16670) Closes #16624 Fixes two issues with aligning the start position and end position to codepoints when calculating the start and end range. When aligning the start position: * use aligned byte index to calculate character index rather than the unadjusted byte When aligning the end position: * do not adjust the end byte if it falls on a UTF-8 codepoint * align byte to the first byte of the next codepoint rather than the last byte of the current codepoint * compute character character end range on the aligned byte index This commit also adds additional test coverage, including multibyte operations that previously failed before this commit.
* | perf: pre-compile embedded Lua source into bytecode (#16631)Gregory Anders2021-12-16
| | | | | | | | | | | | The Lua modules that make up vim.lua are embedded as raw source files into the nvim binary. These sources are loaded by the Lua runtime on startuptime. We can pre-compile these sources into Lua bytecode before embedding them into the binary, which minimizes the size of the binary and improves startuptime.
* | Merge pull request #16134 from zeertzjq/screenpos-borderBjörn Linse2021-12-16
|\ \ | | | | | | fix(screenpos, float): add top and left border adjustment
| * | fix(screenpos, float): add top and left border adjustmentzeertzjq2021-12-15
| | |
* | | fix(terminal): fix resize crash with pending scrollback (#14891)Sean Dewar2021-12-15
|/ / | | | | | | | | | | | | | | | | | | | | | | | | refresh_scrollback assumes pending scrollback rows exist only if the terminal window height decreased (or the screen was full). However, after accumulating scrollback, it's possible in some cases for the terminal height to increase before refresh_scrollback is called via invalidation (especially when the terminal buffer isn't initially displayed in a window before nvim_open_term), which may crash. As we'll have enough room for some scrollback rows, just append them to the top of the buffer until it fills the window, then continue with the previous logic for any remaining scrollback rows if necessary.
* | test: expect the correct screen in TUI paste: big burst of input (#16656)zeertzjq2021-12-15
| |
* | Merge pull request #16602 from zeertzjq/tui-end-streamed-pasteJames McCoy2021-12-13
|\ \
| * | fix(tui): end streamed paste correctly when key buffer is emptyzeertzjq2021-12-10
| | |
* | | feat(ts): add support for multiline nodes in get_node_text (#14999)Mathias Fußenegger2021-12-12
| | | | | | | | | | | | | | | | | | Based on https://github.com/neovim/neovim/pull/14445 This extends `vim.treesitter.query.get_node_text` to return the text that spans a node's range even if start_row ~= end_row.
* | | test: remove references to misc1.czeertzjq2021-12-11
| | |
* | | feat: add autocommand event when search wraps around (#8487)Alejandro Exojo2021-12-10
|/ /
* | Merge pull request #16541 from jamessan/vim-8.2.3664James McCoy2021-12-09
|\ \ | | | | | | vim-patch:8.2.3664,8.2.3743,8.2.3747,8.2.3748,8.2.3757
| * | test(fold): add test for CursorLineFoldGregory Anders2021-12-08
| | |
| * | test(sign): add test for culhl optionGregory Anders2021-12-08
| | |
| * | vim-patch:8.2.3664: cannot adjust sign highlighting for 'cursorline'James McCoy2021-12-08
| | | | | | | | | | | | | | | | | | | | | Problem: Cannot adjust sign highlighting for 'cursorline'. Solution: Add CursorLineSign and CursorLineFold highlight groups. (Gregory Anders, closes vim/vim#9201) https://github.com/vim/vim/commit/e413ea04b716effb28eb49dbc98ad3f9f761545a
* | | Merge pull request #16414 from zeertzjq/terminal-no-invalid-rowsJames McCoy2021-12-09
|\ \ \ | | | | | | | | fix(terminal): return early if there are no invalid rows
| * | | fix(terminal): return early if there are no invalid rowszeertzjq2021-12-08
| | | | | | | | | | | | | | | | Prevent on_lines emitting out-of-bounds line indexes.
* | | | Merge pull request #16564 from glacambre/improve_test_harness_perfJames McCoy2021-12-09
|\ \ \ \ | |_|/ / |/| | | test(helpers): optimize read_file_list
| * | | test(helpers): optimize read_file_listglacambre2021-12-08
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Read_file_list is used to read back data from the nvim log file as the testsuite executes. However, the nvim log file can get really big (each full run of the testsuite appends roughly 150MB of data to this file). Reading each line of this file can thus be extremely slow, and so are the repeated table.insert/table.removes that are done for each line. A solution to this issue is tto only read the end of the file. This results in a sizeable improvement in testsuite run times in some cases, e.g. on my computer: Without this commit: real 20m0.431s user 17m11.163s sys 1m59.422s With this commit: real 4m25.356s user 1m41.673s sys 1m31.253s
* | | Merge pull request #16418 from zeertzjq/terminal-coladvanceJames McCoy2021-12-08
|\ \ \ | | | | | | | | fix(terminal): use coladvance() to calculate buffer cursor position
| * | | fix(terminal): use coladvance() to calculate buffer cursor positionzeertzjq2021-12-08
| |/ /
* | | refactor(diagnostic): remove bufnr parameter from open_float (#16579)Gregory Anders2021-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The overwhelming majority of use cases for `open_float` are to view diagnostics from the current buffer in a floating window. Thus, most use cases will just `0` or `nil` as the first argument, which makes the argument effectively useless and wasteful. In the cause of optimizing for the primary use case, make the `bufnr` parameter an optional parameter in the options table. This still allows using an alternative buffer for those that wish to do so, but makes the "primary" use case much easier. The old signature is preserved for backward compatibility, though it can likely be fully deprecated at some point.
* | | fix(api): allow nvim_buf_set_extmark to accept end_row key (#16548)Gregory Anders2021-12-08
| | | | | | | | | | | | | | | | | | | | | nvim_buf_get_extmark uses "end_row" rather than "end_line" in its 'details' dict, which means callers must modify the key names if they want to re-use the information. Change the parameter name in nvim_buf_set_extmark to "end_row" and use "end_line" as an alias to make this more consistent.
* | | Merge pull request #16421 from seandewar/vim-8.1.0035Jan Edmund Lazo2021-12-07
|\ \ \ | |/ / |/| | vim-patch:8.1.{35,42,64},8.2.{1781,1783,1976,2014,3671}
| * | vim-patch:8.2.3671: restarting Insert mode in prompt buffer too oftenSean Dewar2021-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Restarting Insert mode in prompt buffer too often when a callback switches windows and comes back. (Sean Dewar) Solution: Do not set "restart_edit" when already in Insert mode. https://github.com/vim/vim/commit/34c20ff85b87be587ea5d0398812441b502ee6a5 As Test_prompt_switch_windows is skipped, implement it in prompt_buffer_spec. Replace the 50ms term_wait calls with poke_eventloop (test seems to work anyway without them, so maybe they're not required?) The new test does include a duplicate screen test that may generate a "screen test succeeded immediately" warning, but this is done to match the Vim test.
| * | test(prompt_buffer_spec): include changes from v8.1.1984Sean Dewar2021-12-07
| | | | | | | | | | | | | | | | | | | | | | | | I already ported v8.1.1984 previously, but hadn't updated prompt_buffer_spec to match test_prompt_buffer (which we have but due to Vim features such as term_sendkeys it's mostly skipped). Required for v8.2.3671.
| * | vim-patch:8.2.2014: using CTRL-O in a prompt buffer moves cursor to startSean Dewar2021-12-07
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Using CTRL-O in a prompt buffer moves cursor to start of the line. Solution: Do not move the cursor when restarting edit. (closes vim/vim#7330) https://github.com/vim/vim/commit/ee8b787bcd15f63a938243770065e704c9b5c85f Test_prompt_editing is skipped, so edit the Lua test in prompt_buffer_spec.
| * | vim-patch:8.2.1781: writing to prompt buffer interferes with insert modeSean Dewar2021-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Writing to prompt buffer interferes with insert mode. Solution: Use win_enter() instead of just setting "curwin". (Ben Jackson, closes vim/vim#7035) https://github.com/vim/vim/commit/4537bcc88956f86267c25edf8008e0dbde598652 Vim test will be skipped, so add a Lua test. The problem boils down to the use of aucmd_restbuf in a callback, so just test that (via nvim_buf_set_lines).
* | | Merge pull request #16556 from zeertzjq/hl-change-updateBjörn Linse2021-12-07
|\ \ \ | | | | | | | | fix(highlight): always update window highlight if highlight changed
| * | | fix(highlight): always update window highlight if highlight changedzeertzjq2021-12-07
| |/ /
* / / fix(screen): do not draw filler lines post eof if already at last rowzeertzjq2021-12-07
|/ /
* | Merge pull request #16194 from seandewar/vim-8.1.1925Jan Edmund Lazo2021-12-07
|\ \ | | | | | | vim-patch:7.4.1777,8.1.{1925,1995,2011,2012,2013,2166},8.2.{0532,0871,1168,1241,3576}
| * | vim-patch:7.4.1777Sean Dewar2021-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Newly added features can escape the sandbox. Solution: Add checks for restricted and secure. (Yasuhiro Matsumoto) https://github.com/vim/vim/commit/3849992b16011e36a5cb5be4b127f843389b96fd timer_start is missing check_secure. The timer callback can, for example, call a function defined from outside the sandbox that does stuff that would be disallowed from inside the sandbox. This is usually not allowed. Cherry-pick eval.txt change from: https://github.com/vim/vim/commit/68e6560b84f196c82e27a72669684d5506a3a837 Required for v8.1.2013.
| * | feat(eval/method): partially port v8.1.1993Sean Dewar2021-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: More functions can be used as methods. Solution: Make various functions usable as a method. https://github.com/vim/vim/commit/196b4664432f932625cfb6371dc42c24efe6c203 server2client requires +clientserver, which hasn't been ported yet. The eval.txt docs and test_clientserver.vim tests for server2client already exist, so include those changes. test_bufline.vim: Test for setbufline requires v8.1.1189 (which was reverted in #10848).
* | | Merge pull request #16107 from zeertzjq/vim-8.1.1542Jan Edmund Lazo2021-12-06
|\ \ \ | | | | | | | | vim-patch:8.1.1542,8.2.3549: an OptionSet autocommand does not get enough info
| * | | vim-patch:8.1.1542: an OptionSet autocommand does not get enough infozeertzjq2021-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: An OptionSet autocommand does not get enough info. Solution: Add v:option_command, v:option_oldlocal and v:option_oldglobal. (Latrice Wilgus, closes vim/vim#4118) https://github.com/vim/vim/commit/d7c968794710f338d491072171df48f96612cf72
* | | | fix(diagnostic): escape special chars in file names (#16527)Matthew Toohey2021-12-05
| | | | | | | | | | | | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Gregory Anders <greg@gpanders.com>