aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/cmdline_spec.lua
Commit message (Collapse)AuthorAge
* feat(diagnostic): virtual_lines #31959Maria José Solano2025-01-26
|
* fix(editor): avoid scrolling :substitute confirm message #32149luukvbaal2025-01-22
| | | Regression from 48e2a73.
* fix(cmdline): always show cmdline when it is a prompt #31866luukvbaal2025-01-05
| | | Cmdline prompts should ignore `cmd_silent`.
* feat(ui): more intuitive :substitute confirm prompt #31787luukvbaal2025-01-02
| | | | Problem: Unknown key mappings listed in substitute confirm message. Solution: Include hints as to what the key mappings do.
* feat(ui)!: emit prompt "messages" as cmdline events #31525luukvbaal2025-01-02
| | | | | | | Problem: Prompts are emitted as messages events, where cmdline events are more appropriate. The user input is also emitted as message events in fast context, so cannot be displayed with vim.ui_attach(). Solution: Prompt for user input through cmdline prompts.
* feat(ui): additional arguments for cmdline_show/hide eventsLuuk van Baal2024-12-22
| | | | | | | | Problem: Unable to tell what highlight the prompt part of a cmdline_show event should have, and whether cmdline_hide was emitted after aborting. Solution: Add additional arguments hl_id to cmdline_show, and abort to cmdline_hide.
* fix(tests): needing two calls to setup a screen is cringebfredl2024-11-14
| | | | | | | | | | 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.
* refactor(tests): use more global highlight definitionsbfredl2024-11-11
|
* feat(api): add nvim__redraw for more granular redrawingLuuk van Baal2024-05-02
| | | | | | | | | | | Experimental and subject to future changes. Add a way to redraw certain elements that are not redrawn while Nvim is waiting for input, or currently have no API to do so. This API covers all that can be done with the :redraw* commands, in addition to the following new features: - Immediately move the cursor to a (non-current) window. - Target a specific window or buffer to mark for redraw. - Mark a buffer range for redraw (replaces nvim__buf_redraw_range()). - Redraw the 'statuscolumn'.
* test: improve test conventionsdundargoc2024-04-23
| | | | | | | | | 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.
* Merge pull request #27872 from luukvbaal/cmdheightbfredl2024-04-21
|\ | | | | fix(ui): don't force 'cmdheight' to zero with ext_messages
| * fix(ui): don't force 'cmdheight' to zero with ext_messagesLuuk van Baal2024-04-20
| | | | | | | | Remove remaining code that prevents non-zero 'cmdheight' with ext_messages.
* | fix(api): do not update grid position in nvim_win_set_cursor (#28235)luukvbaal2024-04-21
|/ | | | Revert commit c971f538ab87b537ae4c97bd44167661c5691a2d. Forcing grid cursor position will need a new API like originally proposed in #27858.
* refactor(test): inject after_each differentlyLewis Russell2024-04-10
|
* test: improve test conventionsdundargoc2024-04-08
| | | | Work on https://github.com/neovim/neovim/issues/27004.
* vim-patch:9.0.0581: adding a character for incsearch fails at end of linezeertzjq2024-04-03
| | | | | | | | | Problem: Adding a character for incsearch fails at end of line. Solution: Only check cursor line number. https://github.com/vim/vim/commit/d4566c14e71c55dcef05fb34ea94eba835831527 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor(tests): use new global defaults instead of set_default_attr_idsbfredl2024-03-26
| | | | This will be done in batches.
* fix(ui): ext_cmdline should not move cursor to curwinLuuk van Baal2024-03-15
| | | | | | | | | | | Problem: The ext_cmdline cursor position on the screen seems to rely on an implicit assumption that the event listener implements a cmdline window that is made the current window which is problematic (e.g. breaks 'incsearch' in the actual current window). Solution: Remove this assumption and allow nvim_win_set_cursor() to move the cursor on the screen to a non-current window (previous commit).
* vim-patch:9.1.0106: Visual highlight hard to read with 'termguicolors'zeertzjq2024-02-15
| | | | | | | | | | | | | | | Problem: Visual highlight hard to read with 'termguicolors' (Maxim Kim) Solution: Set Visual GUI foreground to black (with background=light) and lightgrey (with background=dark) (Maxim Kim) fixes: vim/vim#14024 closes: vim/vim#14025 https://github.com/vim/vim/commit/34e4a05d02a016fe230495be8f6c60ddd56f9567 Co-authored-by: Maxim Kim <habamax@gmail.com>
* test: use integers for API Buffer/Window/Tabpage EXT typesLewis Russell2024-01-16
|
* test: rename (meths, funcs) -> (api, fn)Lewis Russell2024-01-12
|
* test: typing for helpers.methsLewis Russell2024-01-12
|
* refactor: format test/*Justin M. Keyes2024-01-03
|
* test: avoid repeated screen lines in expected stateszeertzjq2023-12-09
| | | | | | 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
* refactor(grid): implement rightleftcmd as a post-processing stepbfredl2023-11-03
| | | | | | | Previously, 'rightleftcmd' was implemented by having all code which would affect msg_col or output screen cells be conditional on `cmdmsg_rl`. This change removes all that and instead implements rightleft as a mirroring post-processing step.
* fix(ui): "resize -1" with cmdheight=0 #24758nwounkn2023-09-24
| | | | | | | | | | | | | Problem: Crash from: set cmdheight=0 redrawdebug=invalid resize -1 Solution: Do not invalidate first `p_ch` `msg_grid` rows in `update_screen` when scrolling the screen down after displaying a message, because they may be used later for drawing cmdline. Fixes #22154
* fix(test): fix "indeterminism" warnings in UI testsbfredl2023-09-20
|
* vim-patch:9.0.0579: using freed memory when 'tagfunc' wipes out buffer (#24838)zeertzjq2023-08-22
| | | | | | | | | | | Problem: Using freed memory when 'tagfunc' wipes out buffer that holds 'complete'. Solution: Make a copy of the option. Make sure cursor position is valid. https://github.com/vim/vim/commit/0ff01835a40f549c5c4a550502f62a2ac9ac447c Cherry-pick a cmdwin change from patch 9.0.0500. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.1726: incorrect heights in win_size_restore() (#24765)Sean Dewar2023-08-17
| | | | | | | | | Problem: incorrect heights in win_size_restore() Solution: avoid restoring incorrect heights in win_size_restore() https://github.com/vim/vim/commit/876f5fb570d8401aa4c58af4a5da91f10520aa9d I already merged this prior, so just replace the new test with the old one, but add a test case for the global statusline.
* fix(window): prevent win_size_restore from changing cmdheightSean Dewar2023-07-26
| | | | | | | | | | | | | | | | | | | | | Currently it only skips if `Rows` changed, but it's possible for the height of the usable area for windows to change (e.g: via `&ch`, `&stal` or `&ls`), which can cause the value of `&cmdheight` to change when the sizes are restored. This is a Vim bug, so I've submitted a PR there too. No telling when it'll be merged though, given the current lack of activity there. `ROWS_AVAIL` is convenient here, but also subtracts the `global_stl_height()`. Not ideal, as we also care about the height of the last statusline for other values of `&ls`. Meh. Introduce `last_stl_height` for getting the height of the last statusline and use it in `win_size_save/restore` and `last_status` (means `last_status_rec`'s `statusline` argument will now be true if `&ls` is 3, but that does not change the behaviour). Also corrects the logic in `comp_col` to not assume there's a last statusline if `&ls` is 1 and the last window is floating.
* fix(cmdline): don't redraw 'tabline' in Ex mode (#24123)zeertzjq2023-06-23
| | | | | | | | Redrawing of 'statusline' and 'winbar' are actually already inhibited by RedawingDisabled in Ex mode. In Vim there is a check for `msg_scrolled == 0` (which is false in Ex mode) since Vim doesn't have msgsep. Add a `!exmode_active` check here in Nvim instead.
* feat(ui): add scroll_delta to win_viewport event #19270Matthias Deiml2023-03-12
| | | | | | | | | | scroll_delta contains how much the top line of a window moved since the last time win_viewport was emitted. It is expected to be used to implement smooth scrolling. For this purpose it only counts "virtual" or "displayed" so folds should count as one line. Because of this it adds extra information that cannot be computed from the topline parameter. Fixes #19227
* test: avoid consecutive mouse input at different positions (#21781)zeertzjq2023-01-13
| | | | The seconds call's position may override the first call if the first call isn't processed yet, defeating the purpose of the first call.
* fix(ui): command line issues with external messages (#21709)luukvbaal2023-01-13
| | | | * fix: don't truncate external messages * fix: avoid resizing command line with external messages
* test: add test cases for command line issuesLuuk van Baal2022-12-31
|
* fix(showcmd): assert failure with cmdheight=0 (#21536)zeertzjq2022-12-26
|
* 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")`.
* feat(messages)!: graduate the 'msgsep' featurebfredl2022-10-05
| | | | | | | The old behaviour (e.g. via `set display-=msgsep`) will not be available. Assuming that messages always are being drawn on msg_grid (or not drawn at all, and forwarded to `ext_messages` enabled UI) will allows some simplifcations and enhancements moving forward.
* fix(window): fix equalization with cmdheight=0 (#20369)zeertzjq2022-09-28
|
* fix(ui): allow redrawing statusline when msgsep is used (#20337)zeertzjq2022-09-26
|
* fix(cmdline): don't send invalid cursor with incsearch and cmdheight=0bfredl2022-09-26
| | | | fixes #20306
* fix(messages): validate msg_grid before silent! message with cmdheight=0bfredl2022-09-26
| | | | fixes #20316
* fix(redraw): avoid unnecessary redraws and glitches with floats+messagesbfredl2022-09-22
| | | | | fixes #20106 fixes #20229
* feat(ui): use msg_grid based implementation for cmdheight=0bfredl2022-09-15
|
* cmdheight=0: fix bugs part2 (#19185)Shougo2022-07-31
|
* fix(cmdline): trigger CmdlineEnter and ModeChanged earlier (#19474)zeertzjq2022-07-26
| | | | Match Vim's ordering in code. These tests are unrelated to ext_cmdline. Move them out of that block.
* cmdheight=0: fix bugs #18961Shougo2022-06-30
| | | | | | | | | | | | Continue of #16251 Fix #18953 Fix #18960 Fix #18958 Fix #18955 Fix #18970 Fix #18983 Fix #18995 Fix #19112
* fix(ui): do not call showmode() when setting window height (#18969)zeertzjq2022-06-15
|
* feat: cmdheight=0 #16251Shougo2022-06-13
| | | | | | | | | Fix https://github.com/neovim/neovim/issues/1004 Limitation: All outputs need hit-enter prompt. Related: https://github.com/neovim/neovim/pull/6732 https://github.com/neovim/neovim/pull/4382
* fix(ui): inccomand performance degradationKillTheMule2022-04-05
| | | | It was broken since the introduction of the macro.