summaryrefslogtreecommitdiffstatshomepage
path: root/test/functional/terminal/window_split_tab_spec.lua
AgeCommit message (Collapse)AuthorFiles
2026-02-26test: remove remaining use of feed_command() in terminal/ (#38069)zeertzjq1
Also deduplicate screen lines in some other tests.
2025-06-11fix(terminal): don't disable scrolloff for non-terminal buffers (#34451)zeertzjq1
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/`.
2024-06-12refactor(terminal): move :terminal defaults to _defaults.luaGregory Anders1
2024-04-23test: improve test conventionsdundargoc1
Specifically, functions that are run in the context of the test runner are put in module `test/testutil.lua` while the functions that are run in the context of the test session are put in `test/functional/testnvim.lua`. Closes https://github.com/neovim/neovim/issues/27004.
2024-04-10refactor(test): inject after_each differentlyLewis Russell1
2024-04-08test: improve test conventionsdundargoc1
Work on https://github.com/neovim/neovim/issues/27004.
2024-01-12test: rename (meths, funcs) -> (api, fn)Lewis Russell1
2024-01-12test: typing for helpers.methsLewis Russell1
2024-01-12test: remove helpers.sleep()Lewis Russell1
2024-01-03refactor: format test/*Justin M. Keyes1
2023-12-09test: avoid repeated screen lines in expected stateszeertzjq1
This is the command invoked repeatedly to make the changes: :%s/^\(.*\)|\%(\*\(\d\+\)\)\?$\n\1|\%(\*\(\d\+\)\)\?$/\=submatch(1)..'|*'..(max([str2nr(submatch(2)),1])+max([str2nr(submatch(3)),1]))/g
2023-05-22test: don't unnecessarily specify win/buf for `nvim_(get|set)_option_value`Famiu Haque1
`nvim_(get|set)_option_value` pick the current buffer / window by default for buffer-local/window-local (but not global-local) options. So specifying `buf = 0` or `win = 0` in opts is unnecessary for those options. This PR removes those to reduce code clutter.
2023-05-21refactor(options): deprecate nvim[_buf|_win]_[gs]et_optionLewis Russell1
Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: famiu <famiuhaque@protonmail.com>
2022-11-22test: simplify platform detection (#21020)dundargoc1
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")`.
2022-08-07fix(terminal): skip aucmd_win when checking terminal size (#19668)zeertzjq1
2021-10-09vim-patch:8.2.3461: distinguish Normal and Terminal-Normal mode #15878zeertzjq1
Problem: Cannot distinguish Normal and Terminal-Normal mode. Solution: Make mode() return "nt" for Terminal-Normal mode. (issue vim/vim#8856) https://github.com/vim/vim/commit/72406a4bd2896915b6f541e26d41521a59b1f846
2021-09-01refactor(tests): use assert_alive() #15546Justin M. Keyes1
2020-06-22terminal: preserve mode when using <Cmd>wincmd in terminal mode (#12254)Ghjuvan Lacambre1
2019-08-18test: win: enable WinEnter terminal testJan Edmund Lazo1
2019-05-14ui/terminal: make terminal state redraw like any other stateBjörn Linse1
Previously, ordinary redraws were missing from terminal mode. Instead, there was an async callback that invoked update_screen() on terminal data regardless of mode (as if :redraw! was invoked by a timer). This created some issues: - async changes to an unrelated ordinary buffer were not always redrawn in terminal mode - screen cursor position was not properly updated in terminal mode (partial fix, will be properly fixed in a follow up PR) - ad-hoc logic was needed for interaction with special states such as inccommand or horizontal wildmenu. Instead redraw terminal mode just like any other state. This disables forced redraws in cmdline mode, which were inconisent which async changes to normal buffers (which are not redrawn in cmdline mode).
2019-03-09vim-patch:8.1.0994: fix relative cursor position #9676Justin M. Keyes1
Problem: Relative cursor position is not calculated correctly. Solution: Always set topline, also when window is one line only. (Robert Webb) Add more info to getwininfo() for testing. https://github.com/vim/vim/commit/8fcb60f961bdd134599fb016c6537fd496e800f5
2019-01-29:terminal : set topline based on window height #8325Andrew Pyatkov1
closes #8324 closes #8556
2018-11-10test: adjust time-sensitive tests (#9220)Justin M. Keyes1
- window_split_tab_spec.lua: Put cursor at bottom of :terminal buffer so that it follows output. - inccommand_spec.lua: Increase timeout to allow 2nd retry. - Timer tests are less reliable on Travis CI macOS 10.12/10.13. ref #6829 ref e39dade80b02 ref de13113dc16e ref https://github.com/neovim/neovim/pull/9095#issuecomment-429603452 > We don't guarantee that a X ms timer is triggered during Y ms sleep > for any X<Y, though I would expect the load to be really bad for this > to happen with X=10ms, Y=40ms.
2018-11-05test/win: window_split_tab_spec: fix retry()Justin M. Keyes1
2018-11-05test/win: window_split_tab_spec: increase retry() timeJustin M. Keyes1
The default timeout of 10s only allows 1 retry.
2018-11-04test/win: retry unreliable SIGWINCH testJustin M. Keyes1
2018-11-01win: test: SIGWINCH is noisy #7506Justin M. Keyes1
2017-11-13:terminal : fix crash on resize (#7547)Justin M. Keyes1
closes #7538 Fix wrong window references from #7440 Remove some eager resizing. Still mostly doesn't address #4997.
2017-08-16test: tty-test.c: keep `tty_out` handle aroundJustin M. Keyes1
Now the window_split_tab_spec.lua test seems to work. Also do some cleanup.
2017-08-16win/test: enable more :terminal testsJustin M. Keyes1
To deal with SIGWINCH limitations on Windows, change some resize tests to _shrink_ the screen width. ... But this didn't work, so still ignoring those tests on Windows.
2017-04-09functests: Replace execute with either command or feed_commandZyX1
Hope this will make people using feed_command less likely: this hides bugs. Already found at least two: 1. msgpackparse() will show internal error: hash_add() in case of duplicate keys, though it will still work correctly. Currently silenced. 2. ttimeoutlen was spelled incorrectly, resulting in option not being set when expected. Test was still functioning somehow though. Currently fixed.
2017-02-26test/window_split_tab_spec.lua: fixupJustin M. Keyes1
Make the test work after the "follows cursor" changes. This "auto-resize" feature is going away soon, anyways.
2017-02-26terminal: Don't redraw the entire screen when resizing (#6167)Tommy Allen1
2016-08-26Mark some functional tests as pending in WindowsRui Abreu Ferreira1
2016-08-14tests: don't ignore highlights in terminal testsBjörn Linse1
2016-06-20Add tests for new featureMarco Hinz1
2016-06-20Make existing tests work with new featureMarco Hinz1
2016-06-10functests: Check logs in lua codeZyX1
It is otherwise impossible to determine which test failed sanitizer/valgrind check. test/functional/helpers.lua module return was changed so that tests which do not provide after_each function to get new check will automatically fail.
2015-11-23test/functional: clean up according to luacheck (part 1)Marco Hinz1
2015-03-25test: Add terminal testsThiago de Arruda1
- Modify tty-test to allow easier control over the terminal - Add a new directory with various terminal tests/specifications - Remove a pending job/pty test. - Flush stdout in Screen:snapshot_util() (avoid waiting for the test to finish) - Replace libuv sigwinch watcher by a sigaction handler. libuv randomly fails to deliver signals on OSX. Might be related to the problem fixed by @bbcddc55ee1e5605657592644be0102ed3a5f104 (under the hoods, libuv uses a pipe to deliver signals to the main thread, which might be blocking in some situations)