aboutsummaryrefslogtreecommitdiff
path: root/test/functional/testterm.lua
Commit message (Collapse)AuthorAge
* test(harness): avoid overlong socket filename #41488Justin M. Keyes2026-08-25
| | | | | | | | | | | | | | | | | | | | | | Problem: Test sockets live under `$TMPDIR`, which the harness points at the build dir. On macOS/BSD `sockaddr_un.sun_path` is 104 bytes, and a CI build path plus "nvim.<pid>.<n>" leaves little room: /Users/runner/work/neovim/neovim/build/Xtest_tmpdir_terminal/nvim.runner/aBcDeF/nvim.12345.0 Solution: Point XDG_RUNTIME_DIR (`stdpath('run')`) at "/tmp/nvim_<pid>". 28 bytes: /tmp/nvim_19916/nvim.19919.1 TODO?: - `TEMP_DIR_NAMES` prefers `$TMPDIR` over `/tmp`, so on macOS `stdpath('run')` defaults to the long `/var/folders/<xx>/<…>/T/` path instead of the short `/tmp` alias. Note: - The 104-byte limit applies to the `bind()` arg, not its "realpath", to, so `/tmp/…` symlinks can be used to workaround the limit.
* test(tui_spec): remove unnecessary job_opts variable (#40334)zeertzjq2026-06-20
| | | | | | | | | This was initially added so that the __NVIM_DETACH environment variable can be added to the jobs started in this test. That environment variable is no longer needed, and there is also vim.tbl_extend() that can be used to add an environment variable to a job anyway. Also, make a shallow copy of opts.env in setup_child_nvim(), as mutating the opts.env passed in may mask problems in other tests.
* test(tui_spec): unskip a few more tests on Windows (#38618)zeertzjq2026-03-31
|
* feat(terminal): surface exit code via virttext + nvim_get_chan_info #37987Ayaan2026-03-10
| | | | | | | | | | Problem: When a terminal process exits, "[Process Exited]" text is added to the buffer contents. Solution: - Return `exitcode` field from `nvim_get_chan_info`. - Show it in the default 'statusline'. - Show exitcode as virtual text in the terminal buffer.
* fix(channel): support :detach, :restart on Windows #37977Sanzhar Kuandyk2026-02-28
| | | | | | | | | | | | | | fix: allocate hidden console for detached server Starting the server with UV_PROCESS_DETACHED results in DETACHED_PROCESS, leaving the child without a console. Without a console: CONIN$ / CONOUT$ cannot resolve, causing channel_from_stdio to fail. ConPTY cannot attach, breaking :terminal. This patch allocates a hidden console via AllocConsole() when the server has none, restoring working stdio and enabling ConPTY. Also updates os_set_cloexec to clear HANDLE_FLAG_INHERIT on the RPC pipe handles, matching the Unix F_DUPFD_CLOEXEC behavior.
* test(testterm): remove useless TermCursor highlight definition (#37827)zeertzjq2026-02-12
| | | | | TermCursor already has cterm=reverse. Additionally, now that terminal buffers have a real cursor, the cterm=reverse in TermCursor no longer shows up in the screen state.
* test: fix some type warnings (#37483)zeertzjq2026-01-21
|
* test: skip noisy "terminal mode unavailable" logs #36794Justin M. Keyes2025-12-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Every CI log has a lot of noise at the end, which makes it harder to find relevant test failures: Running tests from test/functional/terminal/tui_spec.lua ... T5831 TUI bg color queries the terminal for background color: T5832 TUI bg color triggers OptionSet from automatic background processing: T5833 TUI bg color sends theme update notifications when background changes #31652: ... Running tests from test/functional/ui/output_spec.lua ... WRN 2025-12-02T03:36:47.304 ui/c/T5831.28003.0 tui_handle_term_mode:223: TUI: terminal mode 2026 unavailable, state 0 WRN 2025-12-02T03:36:47.359 ui/c/T5832.28006.0 tui_handle_term_mode:223: TUI: terminal mode 2048 unavailable, state 0 WRN 2025-12-02T03:36:47.414 ui/c/T5833.28009.0 tui_handle_term_mode:223: TUI: terminal mode 2048 unavailable, state 0 Solution: - Skip logging in test-mode. - This can be reverted later, when these logs are changed to "INFO" level, per this TODO comment: ``` // TODO(bfredl): This is really ILOG but we want it in all builds. // add to show_verbose_terminfo() without being too racy ???? WLOG("TUI: terminal mode %d unavailable, state %d", mode, state); ```
* test(tui_spec): flakiness, global highlight definitions #34958luukvbaal2025-07-16
|
* feat(jobs): jobstart(…,{term=true}), deprecate termopen() #31343Justin M. Keyes2024-12-19
| | | | | | | | | | | | Problem: `termopen` has long been a superficial wrapper around `jobstart`, and has no real purpose. Also, `vim.system` and `nvim_open_term` presumably will replace all features of `jobstart` and `termopen`, so centralizing the logic will help with that. Solution: - Introduce `eval/deprecated.c`, where all deprecated eval funcs will live. - Introduce "term" flag of `jobstart`. - Deprecate `termopen`.
* feat(terminal)!: cursor shape and blink (#31562)Gregory Anders2024-12-17
| | | | | | | | | | | | | | | | | | | | | When a terminal application running inside the terminal emulator sets the cursor shape or blink status of the cursor, update the cursor in the parent terminal to match. This removes the "virtual cursor" that has been in use by the terminal emulator since the beginning. The original rationale for using the virtual cursor was to avoid having to support additional UI methods to change the cursor color for other (non-TUI) UIs, instead relying on the TermCursor and TermCursorNC highlight groups. The TermCursor highlight group is now used in the default 'guicursor' value, which has a new entry for Terminal mode. However, the TermCursorNC highlight group is no longer supported: since terminal windows now use the real cursor, when the window is not focused there is no cursor displayed in the window at all, so there is nothing to highlight. Users can still use the StatusLineTermNC highlight group to differentiate non-focused terminal windows. BREAKING CHANGE: The TermCursorNC highlight group is no longer supported.
* fix(tests): needing two calls to setup a screen is cringebfredl2024-11-14
| | | | | | | | | | Before calling "attach" a screen object is just a dummy container for (row, col) values whose purpose is to be sent as part of the "attach" function call anyway. Just create the screen in an attached state directly. Keep the complete (row, col, options) config together. It is still completely valid to later detach and re-attach as needed, including to another session.
* refactor(tests): rename terminal/testutil.lua => testterm.lua #30372Justin M. Keyes2024-09-15
This module is generally used by any tests that need the full Nvim TUI instead of `screen.lua`. Thus it should live in `functional/` instead of in `functional/terminal/`.