aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal
Commit message (Collapse)AuthorAge
* fix(remote): don't leak memory on failure to connect to server (#21931)zeertzjq2023-01-21
| | | Also fix the race between output and resize in the test for this.
* test(tui_spec): don't expect exact screen in rapid resize test (#21935)zeertzjq2023-01-21
| | | | There may be a race between resizes, so don't expect exact screen. Expect window width instead.
* test(tui_spec): make rapid resize test test what it wants to test (#21933)zeertzjq2023-01-21
| | | | | Actually execute the command. Don't use assert_alive() as it checks the host session instead of the child session. Use screen:expect() instead.
* build(deps): bump libvterm to v0.3.1Christian Clason2023-01-16
| | | | | | | | | | | | | | | | | | | | | | Included patches: 821. By Paul "LeoNerd" Evans on 2022-12-29 Don't bother to emit the unrecognised sequence in DECRQSS response as it provides an echo roundtrip possibility 820. By Paul "LeoNerd" Evans on 2022-11-26 erase_internal() should only set fg/bg colour, resetting other attributes (especially RV) 819. By Paul "LeoNerd" Evans on 2022-11-09 Added vterm_screen_set_default_colors(), which repaints the cells in the buffer(s) 818. By Paul "LeoNerd" Evans on 2022-11-09 Permit either colour argument to be NULL to vterm_state_set_default_colors() 817. By Paul "LeoNerd" Evans on 2022-10-01 Delete the mk_wcswidth functions as they're not used; guard the CJK-wide one with an ifdef as by default we don't use it 816. By Paul "LeoNerd" Evans on 2022-10-01 Make sure to supply empty (void) prototype to functions that take no arguments in bin/vterm-ctrl.c
* test(tui_spec): doesn't use Unicode in cursor_address test (#21703)zeertzjq2023-01-09
| | | Using Unicode makes the test flaky because of #16245.
* test(tui_spec): improve cursor_address test (#21700)zeertzjq2023-01-09
|
* fix(tui): do not invoke loop recursively for pad()bfredl2023-01-06
| | | | fixes #21610
* fix(tui): make a copy of data->params before unibi_format() (#21643)zeertzjq2023-01-05
| | | | | | | | Problem: When unibi_format() modifies params and data->buf overflows, unibi_format() is called again, causing the params to be modified twice. This can happen for escapes sequences that use the %i terminfo format specifier (e.g. cursor_address), which makes unibi_format() increase the param by 1. Solution: Make a copy of data->params before calling unibi_format().
* test(tui_spec): avoid race between nvim_paste and nvim_input (#21639)zeertzjq2023-01-04
| | | | | Now that the TUI calls nvim_paste and nvim_input through RPC, the data race is much more likely, as nvim_paste is deferred while nvim_input is not. Add an expect_child_buf_lines() call to avoid the race.
* fix(tui): more work in the TUIbfredl2022-12-31
|
* feat(tui): run TUI as external processhlpr982022-12-31
|
* test(tui_spec): don't use nested terminal for resize at startup (#21583)zeertzjq2022-12-29
|
* fix(terminal): fix 'mousescroll' not respected in terminal mode (#21415)zeertzjq2022-12-14
|
* fix(chansend): sending lines to terminal in reverse order on Windows #19315Enan Ajmain2022-12-08
| | | | | | | Problem: `chansend()` on Windows sends lines in reverse order. Cause: Using \n instead of \r\n for newlines on Windows. Solution: on Windows, use CRLF newline characters. Fixes #18501
* test: simplify platform detection (#21020)dundargoc2022-11-22
| | | | | Extend the capabilities of is_os to detect more platforms such as freebsd and openbsd. Also remove `iswin()` helper function as it can be replaced by `is_os("win")`.
* test: use isCI to simplify CI detection (#21134)dundargoc2022-11-20
|
* test: fix failing tui_spec.lua tests (#21117)Jakub Łuczyński2022-11-19
| | | | | | | * refactor(test): use exec_lua * fix(test): fix failing tui_spec tests test is failing when path of tty-test does not fit cmdline
* test: introduce skip() #21010dundargoc2022-11-13
| | | | | | | This is essentially a convenience wrapper around the `pending()` function, similar to `skip_fragile()` but more general-purpose. Also remove `pending_win32` function as it can be replaced by `skip(iswin())`.
* vim-patch:9.0.0756 #20680Shougo2022-11-06
| | | | | | Problem: No autocmd event for changing text in a terminal window. Solution: Add TextChangedT. (Shougo Matsushita, closes vim/vim#11366) https://github.com/vim/vim/commit/4ccaedfcd7526983f4b6b3b06b0bfb54f333f1f3
* ci: add cirrus to isCI function to skip tests (#20526)dundargoc2022-10-17
| | | | The environment variable CIRRUS_CI is manually passed to RunTests.cmake as it doesn't get passed when using cmake script mode.
* feat(terminal): recognize underdouble and undercurlAndrey Bushev2022-09-26
|
* test: add tests for #13549 #20285 #20290zeertzjq2022-09-23
|
* ci: move BSD jobs from sourcehut to Cirrus CI #19616dundargoc2022-09-08
| | | | | | | | | | | | | | | | | | | dispatch.sr.ht is being deprecated, meaning that using sourcehut CI won't be possible (see https://github.com/neovim/neovim/issues/19609). Since Github Actions doesn't provide any BSD runners an external service is required and Cirrus CI seems like a good replacement for sourcehut. Initially experimented with using FreeBSD and OpenBSD virtual machines in GitHub Actions, but Cirrus has been a much better fit with better performance, logs and overall experience. Failing tests are automatically skipped on FreeBSD regardless if it's on CI or not. Ideally these tests should only be skipped in CI with the help of `isCI` helper function. Unfortunately, the tests don't recognize the environment variable CIRRUS_CI even if it's set manually. This workaround is good enough for the time being, but we might want to only skip tests when using the CI (or even better, fix the failing tests). Closes: https://github.com/neovim/neovim/issues/19609
* fix(terminal): adopt altscreen test for libvterm 0.2 changesAndreas Schneider2022-09-06
| | | | | | | Due to a rewrite of the resize handling logic in libvterm, the behavior changed. It's actually fixing a bug. https://github.com/cryptomilk/libvterm/commit/16b857457575c3fd6ffdb0866d7a190b69c28312
* feat(pum): pretend 'mousemoveevent' is set when showing right-click menuzeertzjq2022-09-04
|
* feat(tui): recognize sidescroll events (#19992)zeertzjq2022-08-30
| | | | | | Ref https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Other-buttons This works in xterm and kitty. CSI < 66 ; x ; y M sequence is for ScrollWheelLeft. CSI < 67 ; x ; y M sequence is for ScrollWheelRight.
* feat(tui): allow grid and host to disagree on ambiguous-width chars (#19686)zeertzjq2022-08-09
| | | Note: This only applies to ambiguous-width characters.
* fix(terminal): skip aucmd_win when checking terminal size (#19668)zeertzjq2022-08-07
|
* feat(terminal): implement <c-\><c-o> for terminal modebfredl2022-08-02
| | | | this works similar to <c-o> or <c-\><c-o> in insert mode
* fix(terminal): avoid reading over the end of cell.chars (#19580)zeertzjq2022-07-30
|
* vim-patch:9.0.0071: command overlaps with printed text in scrollback (#19505)zeertzjq2022-07-26
| | | | | | | | | | | | | | Problem: Command overlaps with printed text in scrollback. Solution: Clear until end-of-line and use correct message chunk. (closes vim/vim#10765, closes vim/vim#10764) https://github.com/vim/vim/commit/ecdc82e74e6a7e73d9067ece1d5eac33abfde5ed N/A patches for version.c: vim-patch:9.0.0070: using utfc_ptr2char_len() when length is negative Problem: Using utfc_ptr2char_len() when length is negative. Solution: Check value of length. (closes vim/vim#10760) https://github.com/vim/vim/commit/4dc513a22c017b3061287deac74fa55f70a3214c
* test: improve some input testszeertzjq2022-07-25
|
* Merge pull request #19180 from zeertzjq/tui-kitty-keypadzeertzjq2022-07-07
|\ | | | | feat(tui): recognize keypad keys when using kitty keyboard protocol
| * test: add tests for keypad keys from kitty keyboard protocolzeertzjq2022-07-04
| |
* | fix(tui): resize at startup #17795Javier Lopez2022-07-04
|/ | | | | | | | | | | | | | | | | | * fix(test): screen.lua nil index When actual_rows and expected_rows are different avoid a nil index. * fix(tui): resize at startup The deleted code is not needed after 402b4e8. It caused the condition to false positive when the function was called more than once before startup (first normal mode). Being itself what set the dimension and not the user, locking the size of the screen to an incorrect size. Make got_winch an int to mitigate: tui_grid_resize changing the size of the host terminal between the signal handler and the call to sigwinch_cb. Since the actual signal handler uv__signal_handle doesn't directly call the callback, the event loop does. Fixes #17285 Fixes #15044 Fixes #11330
* feat: stdpath('run'), /tmp/nvim.user/ #18993Justin M. Keyes2022-06-30
| | | | | | | | | | | | | | | | Problem: - Since c57f6b28d71d #8519, sockets are created in ~/.local/… but XDG spec says: "XDG_RUNTIME_DIR: Must be on the local filesystem", which implies that XDG_STATE_DIR is potentially non-local. - Not easy to inspect Nvim-created temp files (for debugging etc). Solution: - Store sockets in stdpath('run') ($XDG_RUNTIME_DIR). - Establish "/tmp/nvim.user/" as the tempdir root shared by all Nvims. - Make ok() actually useful. - Introduce assert_nolog(). closes #3517 closes #17093
* refactor(highlight)!: rename attributes to match Vim (#19159)zeertzjq2022-06-30
| | | | | | | | | Ref: https://github.com/vim/vim/commit/84f546363068e4ddfe14a8a2a2322bb8d3a25417 Rename: - `underlineline` to `underdouble` - `underdot` to `underdotted` - `underdash` to `underdashed` `underdouble` also now takes higher precedence than `undercurl`.
* refactor(tests): introduce testprg()Justin M. Keyes2022-06-25
| | | | | | Also: - Add a describe('shell :!') section to system_spec. - Make the test for #16271 work on systems without powershell.
* feat(server): instance "name", store pipes in stdpath(state)Justin M. Keyes2022-06-15
| | | | | | | | | | | | | | | | | | Problem: - Unix sockets are created in random /tmp dirs. - /tmp is messy, unclear when OSes actually clear it. - The generated paths are very ugly. This adds friction to reasoning about which paths belong to which Nvim instances. - No way to provide a human-friendly way to identify Nvim instances in logs or server addresses. Solution: - Store unix sockets in stdpath('state') - Allow --listen "name" and serverstart("name") to given a name (which is appended to a generated path). TODO: - is stdpath(state) the right place?
* fix(terminal): scrollback delete lines immediately #18832Javier Lopez2022-06-08
| | | | | | | | | | | | | | * on_scrollback_option_changed renamed to adjust_scrollback. The function name did not correspond to what it was doing. It is called unconditionally in every refresh of the terminal unrelated if the scrollback option was changed. * new on_scrollback_option_changed function, which calls refresh_terminal, which then calls adjust_scrollback * terminal_check_size is not the appropriate function to call when the option is changed since it only conditionally adjusts the scrollback. Use the new on_scrollback_option_changed fixes #15477 fixes #11811
* 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.
* fix(terminal): do not trim whitespace that is actually in the terminal (#16423)zeertzjq2022-05-17
|
* docs: typo fixes (#17859)dundargoc2022-04-15
| | | | | | | | | | Co-authored-by: Elias Alves Moura <eliamoura.alves@gmail.com> Co-authored-by: venkatesh <shariharanvenkatesh@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Vikas Raj <24727447+numToStr@users.noreply.github.com> Co-authored-by: Steve Vermeulen <sfvermeulen@gmail.com> Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: rwxd <rwxd@pm.me> Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com>
* fix(tui)!: remove `ESC NUL` forced escape (#17198)zeertzjq2022-04-11
| | | | | | | | | | This make Nvim recognize `ESC NUL` as <M-C-Space>, as many terminal emulators (including libvterm) send <M-C-Space> as `ESC NUL`. There is already another unambiguous way to encode a `ESC` key supported by libtermkey: `ESC [ 2 7 u`, which is a `CSI u` sequence. If one still wants to use `ESC NUL` as `ESC`, they can just map <M-C-Space> to <Esc>.
* chore: fix typos (#17670)dundargoc2022-03-17
| | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(paste): don't move cursor past the end of pasted text in Normal modezeertzjq2022-03-15
|
* test: improve terminal channel testszeertzjq2022-03-12
|
* fix(channel): fix channel consistencyerw72022-03-12
| | | | | | | - Fix the problem that chanclose() does not work for channel created by nvim_open_term(). - Fix the problem that the loopback channel is not released. - Fix the error message when sending raw data to the loopback channel.
* fix(api): highlight attribute for underlineKirill Chibisov2022-03-06
| | | | | | | This commit fixes regression introduced in c365de1 when checking for highlight attribute for underline was returning '0' when it was present Fixes #17624.
* test: mention poke_eventloop() instead of wait()zeertzjq2022-03-02
|