aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal
Commit message (Collapse)AuthorAge
...
* 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
|
* test: use helpers.pending_win32(pending) instead of iswin()zeertzjq2022-02-26
|
* ci: skip tests that fail on windowsDundar Göc2022-02-20
|
* fix(input): put modifiers back into typeahead buffer when neededzeertzjq2022-01-23
|
* test: remove redundant feed_command('terminal') (#16993)zeertzjq2022-01-08
| | | It just types :terminal<CR> into the terminal, which is redundant.
* test: make some tests more stable (#16860)zeertzjq2022-01-01
|
* fix(terminal): correctly forward mouse eventszeertzjq2021-12-27
|
* Merge pull request #16596 from ↵Björn Linse2021-12-26
|\ | | | | | | | | dm1try/do_not_leave_terminal_mode_after_mouse_activation do not leave Terminal mode after entering to it using a mouse
| * fix(terminal): ignore left-release mouse actiondm1try2021-12-10
| | | | | | | | | | | | | | | | | | if it is not proccesed by the terminal program to prevent leaving Terminal mode after using a mouse for window switching closes #9483 closes #8691
* | Merge pull request #16294 from zeertzjq/test-fewest-iterationJames McCoy2021-12-18
|\ \ | | | | | | test: require fewest number of main loop iterations possible
| * | test: require fewest number of main loop iterations possiblezeertzjq2021-11-15
| | | | | | | | | | | | | | | Change exc_exec to pcall_err to reduce one main loop iteration. No need to call poke_eventloop() unless after nvim_input().
* | | perf: pre-compile embedded Lua source into bytecode (#16631)Gregory Anders2021-12-16
| | | | | | | | | | | | | | | | | | The Lua modules that make up vim.lua are embedded as raw source files into the nvim binary. These sources are loaded by the Lua runtime on startuptime. We can pre-compile these sources into Lua bytecode before embedding them into the binary, which minimizes the size of the binary and improves startuptime.
* | | fix(terminal): fix resize crash with pending scrollback (#14891)Sean Dewar2021-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | refresh_scrollback assumes pending scrollback rows exist only if the terminal window height decreased (or the screen was full). However, after accumulating scrollback, it's possible in some cases for the terminal height to increase before refresh_scrollback is called via invalidation (especially when the terminal buffer isn't initially displayed in a window before nvim_open_term), which may crash. As we'll have enough room for some scrollback rows, just append them to the top of the buffer until it fills the window, then continue with the previous logic for any remaining scrollback rows if necessary.
* | | test: expect the correct screen in TUI paste: big burst of input (#16656)zeertzjq2021-12-15
| | |
* | | fix(tui): end streamed paste correctly when key buffer is emptyzeertzjq2021-12-10
| | |
* | | Merge pull request #16414 from zeertzjq/terminal-no-invalid-rowsJames McCoy2021-12-09
|\ \ \ | |_|/ |/| | fix(terminal): return early if there are no invalid rows
| * | fix(terminal): return early if there are no invalid rowszeertzjq2021-12-08
| |/ | | | | | | Prevent on_lines emitting out-of-bounds line indexes.
* / fix(terminal): use coladvance() to calculate buffer cursor positionzeertzjq2021-12-08
|/
* test: add tests for freeing channel opened by termopen()zeertzjq2021-11-11
| | | | This indirectly covers #16264
* feat(lua): enable stack traces in error output (#16228)Gregory Anders2021-11-06
|
* vim-patch:8.2.3461: distinguish Normal and Terminal-Normal mode #15878zeertzjq2021-10-09
| | | | | 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
* fix: set cursorlineopt=number in terminal mode (#15493)Yorick Peterse2021-10-06
| | | | | | | | | | When entering terminal mode, cursorlineopt is no longer entirely disabled. Instead, it's set to `number`. Doing so ensures that users using `set cursorline` combined with `set cursorlineopt=number` have consistent highlighting of the line numbers, instead of this being disabled when entering terminal mode. Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
* refactor(tests): use assert_alive() #15546Justin M. Keyes2021-09-01
|
* fix(jobwait): always drain process event queues #15402Gregory Anders2021-08-31
| | | | | | | | | | | | | | Problem: jobwait() returns early if the job was stopped, but the job might have pending callbacks on its event queue which are required to complete its teardown. State such as term->closed might not be updated yet (by the pending callbacks), so codepaths such as :bdelete think the job is still running. Solution: Always flush the job's event queue before returning from jobwait(). ref #15349
* fix(terminal): close without ! if the job is stoppedGregory Anders2021-08-31
| | | | | | - If the terminal job is still running then ! is still required. Closes #4683
* chore: revert unrelated changes in testDylan Armstrong2021-02-27
|
* test: use assert_alive helper rather than eqDylan Armstrong2021-02-27
|
* test: segfault test for empty buffer paste on termDylan Armstrong2021-02-26
|
* tests: Take into account magic hyphen. (#13518)Edwin Pujols2020-12-11
| | | | | | | | | | | | | In Lua patterns the hyphen works like a non-greedy version of Vim's `*`. - Use `%-` when you need a literal hyphen. - If you don't need a regular expression at all, use something like ``` string.find(text, pattern, 1, true) ``` so that the pattern is regarded as a plain, non-magical string. See [1] and [2] in the Lua manual. [1]: https://www.lua.org/manual/5.1/manual.html#pdf-Patterns [2]: https://www.lua.org/manual/5.1/manual.html#pdf-string.find
* test/wildmode_spec: override $PS1Jan Edmund Lazo2020-12-01
| | | | | User config may set $PS1 for a colored prompt. It breaks the screen tests.
* vim-patch:8.0.1525: using :wqa exits even if a job runs in a terminal windowJan Edmund Lazo2020-12-01
| | | | | | | Problem: Using :wqa exits even if a job runs in a terminal window. (Jason Felice) Solution: Check if a terminal has a running job. (closes vim/vim#2654) https://github.com/vim/vim/commit/7a76092a51fc5446426a4bfd9eb6503ec61bf9e9
* test: add functional test for segmented response from terminalerw72020-11-20
|
* GHA: Skip tests that fail due to actions/runner#241James McCoy2020-11-13
|
* A Mudholland Dr. RecastBjörn Linse2020-10-19
| | | | | The commit summary maybe does not make sense, but calling a function that does not wait on anything `wait()` makes even less sense.
* tests/terminal/tui: wait 1ms to avoid data race in FreeBSDJan Edmund Lazo2020-08-02
|
* terminal: fix terminal attribute overflowerw72020-07-29
| | | | fixes #11548
* terminal: preserve mode when using <Cmd>wincmd in terminal mode (#12254)Ghjuvan Lacambre2020-06-22
|
* terminal: disable 'scrolloff' (fixes flicker)Justin M. Keyes2020-05-04
| | | | | | | | | | Besides the special-case in get_scrolloff_value(), it makes sense for 'scrolloff' and 'sidescrolloff' to reflect the correct values (for plugins, scripts, …). ref 53d607af9c53accfd634435908fb79061f1212b9 ref #11915 ref #12230