summaryrefslogtreecommitdiffstatshomepage
path: root/test/unit/vterm_spec.lua
AgeCommit message (Collapse)AuthorFiles
2026-04-15test: replace busted with local harnessLewis Russell1
Replace the busted-based Lua test runner with a repo-local harness. The new harness runs spec files directly under `nvim -ll`, ships its own reporter and lightweight `luassert` shim, and keeps the helper/preload flow used by the functional and unit test suites. Keep the file boundary model shallow and busted-like by restoring `_G`, `package.loaded`, `package.preload`, `arg`, and the process environment between files, without carrying extra reset APIs or custom assertion machinery. Update the build and test entrypoints to use the new runner, add black-box coverage for the harness itself, and drop the bundled busted/luacheck dependency path. AI-assisted: Codex
2026-04-15test(vterm): retain ffi callback structsLewis Russell1
AI-assisted: Codex
2026-03-17feat(terminal): synchronized output (mode 2026) #38284mgleonard4251
Problem: Applications running inside :terminal that use DEC private mode 2026 (synchronized output) to batch screen updates get garbled rendering. Neovim's embedded libvterm does not handle mode 2026, so the synchronization sequences are ignored and intermediate screen states leak through as visual corruption. Solution: Add mode 2026 support to libvterm's state machine and wire it through to terminal.c. When an application enables mode 2026, invalidation of the terminal buffer is deferred until the application disables it, causing all accumulated screen updates to flush as a single atomic refresh. * fix(terminal): harden sync output redraw gating Problem: The initial mode 2026 implementation gated invalidate_terminal() but missed three other redraw paths: term_sb_push/term_sb_pop bypassed the gate by directly adding to invalidated_terminals, refresh_timer_cb could fire mid-sync flushing partial state, and the 10ms timer delay after sync-end left a window for stale repaints. Solution: - Gate term_sb_push/term_sb_pop during synchronized output - Skip syncing terminals in refresh_timer_cb - On sync end, schedule a zero-delay full-screen refresh via sync_flush_pending flag in terminal_receive() - Add news.txt entry for mode 2026 support Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * test(terminal): add vterm unit tests for mode 2026 Add unit-level tests for synchronized output (mode 2026) to vterm_spec.lua, covering settermprop callbacks and DECRQM query/response. Suggested-by: justinmk Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(terminal): address review feedback for mode 2026 - Use multiqueue_put(main_loop.events) instead of restarting the global refresh timer on sync end, to avoid affecting other invalidated terminals. - Add screen:expect_unchanged() to verify screen doesn't update during sync mode. - Merge buffer-lines test into existing test. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-27feat(terminal): support SGR dim, overline attributes #37997Riccardo Mazzarini1
Problem: libvterm doesn't support parsing the dim and overline attributes, so when a program running in the embedded terminal emits one of these escape codes, we ignore it and don't surface it to the outer terminal. Solution: tweak libvterm to add support for both attributes.
2026-02-06fix(vterm): handle split UTF-8 after ASCII properly (#37721)zeertzjq1
Problem: libvterm doesn't handle split UTF-8 sequence after ASCII. Solution: Only use one UTF-8 encoding state per vterm state.
2026-02-05fix(terminal): handle split composing chars at right edge (#37694)zeertzjq1
Problem: Recombining composing chars in terminal doesn't work at right edge. Solution: Check for the case where printing the previous char didn't advance the cursor. Reset at_phantom when returning to combine_pos.
2025-07-15refactor(vterm): update vterm DA1 responseGregory Anders1
Update vterm's DA1 response to the more modern version that indicates level 1 support for VT100 emulation (61) as well as ANSI color support (22).
2025-07-09feat(tui): use DA1 response to determine OSC 52 supportGregory Anders1
Many terminals now include support for OSC 52 in their Primary Device Attributes (DA1) response. This is preferable to using XTGETTCAP because DA1 is _much_ more broadly supported.
2025-05-22fix(tests): use uv.spawn instead of io.popen for unittest helpersbfredl1
The old implementation of repeated_read_cmd would attempt to run the command multiple times to handle racyness of async output. Code like this should not be written. Instead, use the libuv event loop to read until the process has exited and the pipe has been closed. This causes some previous discarded errors to be propagated. Fix these as well.
2025-01-21feat(terminal): forward X1 and X2 mouse eventszeertzjq1
Ref: https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Other-buttons
2025-01-16test: use esc sequences in vterm unit testsGregory Anders1
2025-01-16feat(terminal): add support for kitty keyboard protocolGregory Anders1
This commit adds basic support for the kitty keyboard protocol to Neovim's builtin terminal. For now only the first mode ("Disambiguate escape codes") is supported.
2025-01-13refactor: delete duplicate utf8-functionalitydundargoc1
Also remove British National Replacement Character Set. We keep the DEC Special Graphics and ASCII despite it not being unicode as some old software such as calcurse still rely on this functionality. References: - https://github.com/neovim/neovim/pull/31934#discussion_r1911046426 - https://en.wikipedia.org/wiki/DEC_Special_Graphics - https://vt100.net/docs/vt220-rm/chapter2.html#S2.4.3
2025-01-11docs: miscdundargoc1
Co-authored-by: Axel <axelhjq@gmail.com> Co-authored-by: Colin Kennedy <colinvfx@gmail.com> Co-authored-by: Daiki Noda <sys9kdr@users.noreply.github.com> Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: Jean-Jacq du Plessis <1030058+jj-du-plessis@users.noreply.github.com> Co-authored-by: Juan Giordana <juangiordana@gmail.com> Co-authored-by: Lincoln Wallace <locnnil0@gmail.com> Co-authored-by: Matti Hellström <hellstrom@scm.com> Co-authored-by: Steven Locorotondo <steven.locorotondo@justeattakeaway.com> Co-authored-by: Yochem van Rosmalen <git@yochem.nl> Co-authored-by: glepnir <glephunter@gmail.com> Co-authored-by: ifish <fishioon@live.com>
2025-01-07refactor: adopt vtermdundargoc1
We have changed too much to consider it a mere bundled dependency (such as unicode handling in e3bfcf2fd4a4ebf00b104b082cfe83c8144a842d), and can consider it our own at this point.
2025-01-02feat(terminal): support grapheme clusters, including emojibfredl1
2024-12-02test(vterm): move test functions into vterm_test fixtureJames McCoy1
In order to run unittests with a release build, we need the test functions to be accessible when NDEBUG is defined. Moving the functions into the test fixture ensures they are available and only available for use by the unit tests.
2024-11-09docs: misc (#30914)dundargoc1
Co-authored-by: Ernie Rael <errael@raelity.com> Co-authored-by: Famiu Haque <famiuhaque@proton.me> Co-authored-by: Jade <spacey-sooty@proton.me> Co-authored-by: glepnir <glephunter@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-10-22test: port libvterm unit test to neovim test suitedundargoc1
These were imported from the v0.3.3 git tag https://github.com/neovim/libvterm/tree/v0.3.3 and not the latest commit. This is for compatibility reasons as the libvterm code was imported from v0.3.3.