aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/tui_spec.lua
Commit message (Collapse)AuthorAge
* fix(tui): handle cursor visibility properly (#26091)zeertzjq2023-11-17
| | | | The test is for the case without 'termsync' because libvterm doesn't support synchronized output, and it passes without this PR.
* test: use ST terminator instead of BEL in OSC sequencesGregory Anders2023-11-13
| | | | | | | libtermkey does not interpret OSC sequences that end with a BEL (0x07) instead of an ST (0x1b 0x5c) terminator. This causes these tests to fail since the OSC response is now parsed via libtermkey. Change the tests to use the ST terminator to appease libtermkey.
* refactor(grid): do arabic shaping in one placebfredl2023-10-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | The 'arabicshape' feature of vim is a transformation of unicode text to make arabic and some related scripts look better at display time. In particular the content of a cell will be adjusted depending on the (original) content of the cells just before and after it. This is implemented by the arabic_shape() function in nvim. Before this commit, shaping was invoked in four different contexts: - when rendering buffer text in win_line() - in line_putchar() for rendering virtual text - as part of grid_line_puts, used by messages and statuslines and similar - as part of draw_cmdline() for drawing the cmdline This replaces all these with a post-processing step in grid_put_linebuf(), which has become the entry point for all text rendering after recent refactors. An aim of this is to make the handling of multibyte text yet simpler. One of the main reasons multibyte chars needs to be "parsed" into codepoint arrays of composing chars is so that these could be inspected for the purpose of shaping. This can likely be vastly simplified in many contexts where only the total length (in bytes) and width of composed char is needed.
* refactor: remove longdundargoc2023-09-29
| | | | | long is 32-bits even on 64-bit windows which makes the type suboptimal for a codebase meant to be cross-platform.
* test(tui_spec): small consistency fixes (#25332)zeertzjq2023-09-24
| | | | | - Make indent consistent. - Remove outdated "Only single integration test" comment. - Don't use setup() as function name as it's used by busted.
* fix(tui): make :cquit work properly with remote TUI (#25313)zeertzjq2023-09-23
|
* test(tui_spec): update cursor_address test for wrap flag (#25228)zeertzjq2023-09-18
|
* fix(ui): avoid ambiguity about chunk that clears part of line (#24982)zeertzjq2023-09-02
| | | Co-authored-by: bfredl <bjorn.linse@gmail.com>
* test: update tests for auto-closing :term buffersGregory Anders2023-08-10
| | | | | | | | The terminal buffer closes automatically when using `:terminal` and the command exits without an error. This messes up some tests that expect the terminal buffer to still be open. We can force the buffer not to close by passing an argument to `:terminal`. This can be anything, since the shell-test stub simply prints whatever argument it's given.
* fix(terminal): forward horizontal mouse scrolling (#24552)zeertzjq2023-08-04
|
* test: reduce flakiness (#24443)zeertzjq2023-07-23
| | | | | | | Avoid consecutive RPC requests involving :startinsert or :stopinsert, because consecutive RPC requests may be processed together, before the :startinsert or :stopinsert takes effect. Also change some feed_command() to command() to make tests faster.
* feat(tui): support Super and Meta modifiers (#24357)zeertzjq2023-07-15
|
* test(tui): add test for overriding argv[0] (#24293)zeertzjq2023-07-08
|
* vim-patch:9.0.1634: message is cleared when removing mode messagezeertzjq2023-06-16
| | | | | | | | | Problem: Message is cleared when removing mode message (Gary Johnson). Solution: Do not clear the command line after displaying a message. https://github.com/vim/vim/commit/800cdbb7caeb5dd4379c6cb071bb12391f20bcf3 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* feat(lua): rename vim.loop -> vim.uv (#22846)Lewis Russell2023-06-03
|
* test: don't unnecessarily specify win/buf for `nvim_(get|set)_option_value`Famiu Haque2023-05-22
| | | | `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.
* refactor(options): deprecate nvim[_buf|_win]_[gs]et_optionLewis Russell2023-05-21
| | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: famiu <famiuhaque@protonmail.com>
* fix(messages): ensure msg_grid is at top at more prompt (#23584)zeertzjq2023-05-17
|
* Merge pull request #23415 from zeertzjq/sigwinch-redrawbfredl2023-05-06
|\ | | | | fix(tui): redraw on SIGWINCH even if size didn't change
| * fix(tui): redraw on SIGWINCH even if size didn't changezeertzjq2023-05-01
| |
* | fix(tui): grid_clear properly clears the screenLuuk van Baal2023-05-03
|/ | | | | | | Problem: When setting a shell size smaller than the containing terminal window through `:winsize` or `:set lines/columns` the screen is not properly cleared. Solution: Clear the tui dimensions rather than the grid dimensions.
* Merge #22382 has('gui_running')Justin M. Keyes2023-02-28
|\
| * feat(ui): restore has('gui_running')Justin M. Keyes2023-02-27
| | | | | | | | | | | | | | | | | | | | Problem: has('gui_running') is still common in the wild and our answer has changed over time, causing frustration. https://github.com/vimpostor/vim-tpipeline/commit/95a6ccbe9f33bc42dd4cee45731d8bc3fbcd92d1 Solution: Use stdin_tty/stdout_tty to decide if a UI is (not) a GUI.
| * feat(api): more fields in nvim_list_uisJustin M. Keyes2023-02-27
| | | | | | | | | | | | | | | | Problem: nvim_list_uis does not report all ":help ui-option" fields. Solution: Store ":help ui-option" fields on the `UI` object and update ui_array.
* | fix(tui): avoid stack-use-after-scope with cursor color (#22435)zeertzjq2023-02-28
|/
* test(tui_spec): use RPC request to setup autocommandszeertzjq2023-02-18
| | | | This avoids changing cmdline and fixes a warning.
* test: make {MATCH:} behave less unexpectedly in screen:expect()zeertzjq2023-02-18
| | | | Include the rest of the line and allow multiple {MATCH:} patterns.
* fix(tui): exit on input eofzeertzjq2023-02-14
|
* test(tui_spec): remove unnecessary arguments for remote UIzeertzjq2023-02-14
|
* fix(rpc): ignore redraw events when exiting (#22184)zeertzjq2023-02-09
| | | | When a TUI client has already stopped, handling UI events will cause a heap-use-after-free, so ignore them.
* fix(exit): skip unnecessary steps in TUI preserve_exit() (#21897)zeertzjq2023-02-02
| | | | This prevents the TUI from doing unexpected things when receiving a deadly signal or running out of memory.
* fix(remote): don't leak memory on failure to connect to server (#21931)zeertzjq2023-01-21
| | | Also fix the race between output and resize in the test for this.
* test(tui_spec): don't expect exact screen in rapid resize test (#21935)zeertzjq2023-01-21
| | | | There may be a race between resizes, so don't expect exact screen. Expect window width instead.
* test(tui_spec): make rapid resize test test what it wants to test (#21933)zeertzjq2023-01-21
| | | | | Actually execute the command. Don't use assert_alive() as it checks the host session instead of the child session. Use screen:expect() instead.
* build(deps): bump libvterm to v0.3.1Christian Clason2023-01-16
| | | | | | | | | | | | | | | | | | | | | | Included patches: 821. By Paul "LeoNerd" Evans on 2022-12-29 Don't bother to emit the unrecognised sequence in DECRQSS response as it provides an echo roundtrip possibility 820. By Paul "LeoNerd" Evans on 2022-11-26 erase_internal() should only set fg/bg colour, resetting other attributes (especially RV) 819. By Paul "LeoNerd" Evans on 2022-11-09 Added vterm_screen_set_default_colors(), which repaints the cells in the buffer(s) 818. By Paul "LeoNerd" Evans on 2022-11-09 Permit either colour argument to be NULL to vterm_state_set_default_colors() 817. By Paul "LeoNerd" Evans on 2022-10-01 Delete the mk_wcswidth functions as they're not used; guard the CJK-wide one with an ifdef as by default we don't use it 816. By Paul "LeoNerd" Evans on 2022-10-01 Make sure to supply empty (void) prototype to functions that take no arguments in bin/vterm-ctrl.c
* test(tui_spec): doesn't use Unicode in cursor_address test (#21703)zeertzjq2023-01-09
| | | Using Unicode makes the test flaky because of #16245.
* test(tui_spec): improve cursor_address test (#21700)zeertzjq2023-01-09
|
* fix(tui): do not invoke loop recursively for pad()bfredl2023-01-06
| | | | fixes #21610
* fix(tui): make a copy of data->params before unibi_format() (#21643)zeertzjq2023-01-05
| | | | | | | | Problem: When unibi_format() modifies params and data->buf overflows, unibi_format() is called again, causing the params to be modified twice. This can happen for escapes sequences that use the %i terminfo format specifier (e.g. cursor_address), which makes unibi_format() increase the param by 1. Solution: Make a copy of data->params before calling unibi_format().
* test(tui_spec): avoid race between nvim_paste and nvim_input (#21639)zeertzjq2023-01-04
| | | | | Now that the TUI calls nvim_paste and nvim_input through RPC, the data race is much more likely, as nvim_paste is deferred while nvim_input is not. Add an expect_child_buf_lines() call to avoid the race.
* fix(tui): more work in the TUIbfredl2022-12-31
|
* feat(tui): run TUI as external processhlpr982022-12-31
|
* test(tui_spec): don't use nested terminal for resize at startup (#21583)zeertzjq2022-12-29
|
* test: simplify platform detection (#21020)dundargoc2022-11-22
| | | | | 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")`.
* test: use isCI to simplify CI detection (#21134)dundargoc2022-11-20
|
* test: fix failing tui_spec.lua tests (#21117)Jakub Łuczyński2022-11-19
| | | | | | | * refactor(test): use exec_lua * fix(test): fix failing tui_spec tests test is failing when path of tty-test does not fit cmdline
* test: introduce skip() #21010dundargoc2022-11-13
| | | | | | | This is essentially a convenience wrapper around the `pending()` function, similar to `skip_fragile()` but more general-purpose. Also remove `pending_win32` function as it can be replaced by `skip(iswin())`.
* feat(pum): pretend 'mousemoveevent' is set when showing right-click menuzeertzjq2022-09-04
|
* feat(tui): recognize sidescroll events (#19992)zeertzjq2022-08-30
| | | | | | Ref https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Other-buttons This works in xterm and kitty. CSI < 66 ; x ; y M sequence is for ScrollWheelLeft. CSI < 67 ; x ; y M sequence is for ScrollWheelRight.
* feat(tui): allow grid and host to disagree on ambiguous-width chars (#19686)zeertzjq2022-08-09
| | | Note: This only applies to ambiguous-width characters.