aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal
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.
* fix(terminal): keep focus when scrolling number column of another window ↵zeertzjq2023-10-31
| | | | (#25848)
* fix(terminal): don't lose focus on <MouseMove> (#25845)zeertzjq2023-10-31
|
* fix(terminal): avoid Insert mode in Terminal buffer (#25820)zeertzjq2023-10-29
|
* fix(terminal): assign channel to terminal earlier (#25771)zeertzjq2023-10-25
|
* test(terminal/channel_spec): fix flakiness (#25649)zeertzjq2023-10-15
|
* 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.
* fix(terminal): check terminal size at end of screen update (#25480)zeertzjq2023-10-03
|
* 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: only trim trailing spaces in swapfile tests (#25341)zeertzjq2023-09-24
|
* 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
|
* test(windows): unskip working tests (#25153)dundargoc2023-09-15
| | | Also simplify home detection with os_homedir()
* fix(ui): avoid ambiguity about chunk that clears part of line (#24982)zeertzjq2023-09-02
| | | Co-authored-by: bfredl <bjorn.linse@gmail.com>
* fix(terminal): handle horizontal scrolling in another window (#24828)zeertzjq2023-08-21
|
* test(terminal): fix scrollback test flakiness (#24708)zeertzjq2023-08-14
| | | | Problem: Terminal scrollback test is flaky. Solution: Use INTERACT flag so the job doesn't exit immediately.
* 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
|
* fix(terminal): include modifiers when forwarding mouse (#24549)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.
* test: check that TextChangedT cannot delete terminal buffer (#24437)zeertzjq2023-07-23
|
* test: check real cursor position in Terminal mode (#24436)zeertzjq2023-07-23
|
* fix(terminal): send Shift-Home Shift-End Ctrl-Home Ctrl-End (#24418)zeertzjq2023-07-22
|
* fix(terminal): don't send unknown special keys to terminal (#24378)zeertzjq2023-07-17
| | | | Special keys are negative integers, so sending them to terminal leads to strange behavior.
* feat(tui): support Super and Meta modifiers (#24357)zeertzjq2023-07-15
|
* test(tui): add test for overriding argv[0] (#24293)zeertzjq2023-07-08
|
* fix(api): disallow some more functions during textlockSean Dewar2023-07-05
| | | | | | | | | | | | | | | | | | Problem: nvim_buf_set_text(), nvim_open_term() and termopen() all change buffer text, which is forbidden during textlock. Additionally, nvim_open_term() and termopen() may be used to convert the cmdwin buffer into a terminal buffer, which is weird. Solution: Allow nvim_buf_set_text() and nvim_open_term() in the cmdwin, but disallow nvim_open_term() from converting the cmdwin buffer into a terminal buffer. termopen() is not allowed in the cmdwin (as it always operates on curbuf), so just check text_locked(). Also happens to improve the error in #21055: nvim_buf_set_text() was callable during textlock, but happened to check textlock indirectly via u_save(); however, this caused the error to be overwritten by an unhelpful "Failed to save undo information" message when msg_list == NULL (e.g: an `<expr>` mapping invoked outside of do_cmdline()).
* 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
|
* feat(term): enable reflow by default (#21124)Christian Clason2023-05-24
| | | | | | | | | libvterm v0.3 supports reflow of terminal buffer when Nvim is resized Since v0.3 is now a required dependency, enable it by default to find (and fix) possible issues. Note: Neovim's scrollback buffer does not support reflow (yet), so lines vanishing into the buffer due to a too small window will be restored without reflow.
* 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
|
* test: skip flaky test on Windowsdundargoc2023-05-14
|
* 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.
* test(terminal/channel_spec): fix screen test immediate success (#23192)zeertzjq2023-04-19
| | | Check for the [No Name] after wiping the buffer.
* refactor: rename local API alias from a to apiLewis Russell2023-04-05
| | | | | | | | Problem: Codebase inconsistently binds vim.api onto a or api. Solution: Use api everywhere. a as an identifier is too short to have at the module level.
* feat(vim.version): more coercion with strict=falseJustin M. Keyes2023-03-20
| | | | | | | | | | | | | Problem: "tmux 3.2a" (output from "tmux -V") is not parsed easily. Solution: With `strict=false`, discard everything before the first digit. - rename Semver => Version - rename vim.version.version() => vim.version._version() - rename matches() => has() - remove `opts` from cmp()
* fix: pasting in terminal buffer on windows #22566Enan Ajmain2023-03-19
| | | | | | | | | | | | | | | | | | Problem: On Windows, pasting multiple lines on a terminal buffer cause all the lines to appear on the same line, i.e., the line breaks are lost. Cause: Windows shells expect "\r\n" as line break but "terminal_paste" function uses "\n". Solution: Use "\r\n" as line break for pasting in terminal buffer on Windows. Note: Although this issue was reported with powershell set as 'shell', it occurs in cmd too. Fixes #14621
* test: unskip working Windows tests (#22537)dundargoc2023-03-13
| | | | Some tests that were previously not working have started to work again for unspecified reasons, so let's enable them.
* 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.