summaryrefslogtreecommitdiffstatshomepage
path: root/test/functional/testterm.lua
AgeCommit message (Collapse)AuthorFiles
2026-03-31test(tui_spec): unskip a few more tests on Windows (#38618)zeertzjq1
2026-03-10feat(terminal): surface exit code via virttext + nvim_get_chan_info #37987Ayaan1
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.
2026-02-28fix(channel): support :detach, :restart on Windows #37977Sanzhar Kuandyk1
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.
2026-02-12test(testterm): remove useless TermCursor highlight definition (#37827)zeertzjq1
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.
2026-01-21test: fix some type warnings (#37483)zeertzjq1
2025-12-05test: skip noisy "terminal mode unavailable" logs #36794Justin M. Keyes1
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); ```
2025-07-16test(tui_spec): flakiness, global highlight definitions #34958luukvbaal1
2024-12-19feat(jobs): jobstart(…,{term=true}), deprecate termopen() #31343Justin M. Keyes1
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`.
2024-12-17feat(terminal)!: cursor shape and blink (#31562)Gregory Anders1
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.
2024-11-14fix(tests): needing two calls to setup a screen is cringebfredl1
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.
2024-09-15refactor(tests): rename terminal/testutil.lua => testterm.lua #30372Justin M. Keyes1
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/`.