aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui
Commit message (Collapse)AuthorAge
* fix(messages): add a trailing space to inputlist() etc. prompts (#32328)zeertzjq2025-02-05
| | | | Before #31525 the prompts had a trailing space. Also add a test for #7857.
* vim-patch:9.1.1027: no sanitize check when running linematchzeertzjq2025-02-04
| | | | | | | | | | | | Problem: no sanitize check when running linematch Solution: add sanitize check before applying the linematch algorithm, similar to diff_find_change() (Jonathon) closes: vim/vim#16446 https://github.com/vim/vim/commit/ca307efe486670b76563a4a287bc94dace57fb74 Co-authored-by: Jonathon <jonathonwhite@protonmail.com>
* fix(statusline): overwriting stl_items with nvim_eval_statusline() {-item #32265luukvbaal2025-02-02
| | | | | | | | | | Problem: When an evaluation {-item calls `nvim_eval_statusline()`, that nested call may overwrite the same memory used for `stl_items`. Solution: Make `curitem` static and use it to compute an offset to avoid overwriting `stl_items` in nested calls to `build_stl_str_hl()`. Move miscellaneous statusline tests into `describe()` block.
* fix(float): cannot set title/footer independently #31993glepnir2025-01-27
| | | | | | | | Problem: `nvim_win_set_config` cannot set the title and footer independently. When only one is given, the other is reset to the default of "left". Solution: Reuse existing title/footer value if not provided.
* feat(diagnostic): virtual_lines #31959Maria José Solano2025-01-26
|
* feat(extmarks): virtual text can be right-aligned, truncated #31921georgev932025-01-24
| | | | | | | | | Problem: Right aligned virtual text can cover up buffer text if virtual text is too long Solution: An additional option for `virt_text_pos` called `eol_right_align` has been added to truncate virtual text if it would have otherwise covered up buffer text. This ensures the virtual text extends no further left than EOL.
* fix(messages): avoid empty msg_showmode with 'noshowmode'Luuk van Baal2025-01-24
|
* fix(column): apply custom highlight to last 'statuscolumn' segment (#32182)luukvbaal2025-01-24
|
* fix(mouse): 'statuscolumn' fold and popopmenu handlingLuuk van Baal2025-01-23
| | | | | | | | | Problem: A right-click on the 'statuscolumn' does not open the popupmenu, even if a cell without a clickdef is clicked. Clicking the %C fold item does not open/close the fold. Solution: Open the popupmenu when there is no clickdef like right-clicking the sign/numbercolumn does. Fill "linebuf_vcol" when drawing the 'statuscolumn' to handle foldcolumn item clicks.
* feat(api): combined highlights in nvim_eval_statusline()Luuk van Baal2025-01-23
| | | | | | | | | | | Problem: Combined highlighting was not applied to nvim_eval_statusline(), and 'statuscolumn' sign segment/numhl highlights. Solution: Add an additional `groups` element to the return value of `nvim_eval_statusline()->highlights`. This is an array of stacked highlight groups (highest priority last). Also resolve combined highlights for the 'statuscolumn' sign segment/numhl highlights. Expose/synchronize some drawline.c logic that is now mimicked in three different places.
* fix(editor): avoid scrolling :substitute confirm message #32149luukvbaal2025-01-22
| | | Regression from 48e2a73.
* Merge pull request #32098 from bfredl/multihl_groupbfredl2025-01-21
|\ | | | | feat(extmark): stack multiple highlight groups in `hl_group`
| * feat(extmark): stack multiple highlight groups in `hl_group`bfredl2025-01-21
| | | | | | | | | | | | | | | | | | This has been possible in the "backend" for a while but API was missing. Followup: we will need a `details2=true` mode for `nvim_get_hl_id_by_name` to return information in a way forward compatible with even further enhancements.
* | feat(inccommand): preview 'nomodifiable' buffers #32034Donatas2025-01-20
|/ | | | | | | | Problem: Incremental preview is not allowed on 'nomodifiable' buffers. Solution: - Allow preview on 'nomodifiable' buffers. - Restore the 'modifiable' option in case the preview function changes it.
* vim-patch:9.1.1018: v9.1.0743 causes regression with diff mode (#32047)zeertzjq2025-01-16
| | | | | | | | | | Problem: v9.1.0743 causes regression with diff mode Solution: Fix the regression with overlapping regions closes: vim/vim#16454 https://github.com/vim/vim/commit/01f6509fb2de1627cc4ec2c109cd0aa2e3346d50 Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
* Merge #32013 from luukvbaal/shellkindJustin M. Keyes2025-01-15
|\
| * fix(messages): verbose kind for nvim_echo()Luuk van Baal2025-01-15
| | | | | | | | | | Problem: No "verbose" kind for nvim_echo() opts->verbose. Solution: Pass NULL "kind" to indicate no new kind.
| * feat(messages): add :!cmd shell message kindsLuuk van Baal2025-01-15
| | | | | | | | Also print stderr error messages with ErrorMsg highlight group.
* | Merge #32001 from MariaSolOs/consistent-namespacesJustin M. Keyes2025-01-15
|\ \
| * | refactor: use nvim.foo.bar format for autocommand groupsMaria José Solano2025-01-14
| |/
* / feat(api): nvim_open_win() relative to tabline and laststatus #32006luukvbaal2025-01-14
|/ | | | | | | Problem: Anchoring a floating window to the tabline and laststatus is cumbersome; requiring autocommands and looping over all windows/tabpages. Solution: Add new "tabline" and "laststatus" options to the `relative` field of nvim_open_win() to place a window relative to.
* feat(messages): "verbose" message kind #31991luukvbaal2025-01-13
|
* vim-patch:9.1.1011: popupmenu internal error with some abbr in completion ↵zeertzjq2025-01-13
| | | | | | | | | | | | item (#31988) Problem: Popup menu internal error with some abbr in completion item. Solution: Don't compute attributes when there is no corresponding text. Reduce indent in pum_redraw() while at it (zeertzjq). fixes: vim/vim#16427 closes: vim/vim#16435 https://github.com/vim/vim/commit/3a0cc36c69744a7727ce34311d39d2d9d8ddc6f9
* vim-patch:9.1.1005: completion text is highlighted even with no pattern ↵zeertzjq2025-01-12
| | | | | | | | | | | | | found (#31973) Problem: completion text is highlighted even with no pattern found Solution: use ins_compl_leader_len() instead of checking compl_leader.length (glepnir) closes: vim/vim#16422 https://github.com/vim/vim/commit/9fddb8ae770be3e16545dd4c2f4cfaad8f62cb40 Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.0996: ComplMatchIns may highlight wrong text (#31931)glepnir2025-01-10
| | | | | | | | | | Problem: ComplMatchIns may highlight wrong text Solution: don't highlight in case of fuzzy match, skip-highlight when not inserting anything (glepnir) closes: vim/vim#16404 https://github.com/vim/vim/commit/e890887b8052561ac5f8dce218e578ed28599cc6
* Merge #31900 from luukvbaal/nvim_echoJustin M. Keyes2025-01-09
|\
| * feat(api): add err field to nvim_echo() optsLuuk van Baal2025-01-09
| | | | | | | | | | | | | | | | Problem: We want to deprecate `nvim_err_write(ln)()` but there is no obvious replacement (from Lua). Meanwhile we already have `nvim_echo()` with an `opts` argument. Solution: Add `err` argument to `nvim_echo()` that directly maps to `:echoerr`.
* | Merge pull request #31844 from bfredl/iter_crashbfredl2025-01-09
|\ \ | |/ |/| fix(decoration): fix crash when on_lines decor provider modifies marktree
| * fix(decoration): fix crash when on_lines decor provider modifies marktreebfredl2025-01-09
| | | | | | | | | | | | | | | | | | If a "on_lines" callback changes the structure of the marktree, the iterator (which is used for an entire window viewport) might now point to invalid memory. Restore the iterator to the beginning of the line in this case. fixes #29484
* | fix(cmdline): always show cmdline when it is a prompt #31866luukvbaal2025-01-05
| | | | | | Cmdline prompts should ignore `cmd_silent`.
* | fix(popup): wrong extmark data sync when lines changed in popup preview #30246glepnir2025-01-05
| | | | | | | | | | | | | | | | Problem: when popup preview buffer has filetype like markdown and ts is enabled, the extmark clean and update not correct, if add the extmark sync there has lots of duplicate codes like nvim_buf_set_lines. Solution: use nvim_buf_set_lines api internally to set info to popup preview buffer.
* | refactor(tests): merge n.spawn/n.spawn_argv into n.new_session #31859Justin M. Keyes2025-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: - `n.spawn()` is misleading because it also connects RPC, it's not just "spawning" a process. - It's confusing that `n.spawn()` and `n.spawn_argv()` are separate. Solution: - Replace `n.spawn()`/`n.spawn_argv()` with a single function `n.new_session()`. This name aligns with the existing functions `n.set_session`/`n.get_session`. - Note: removes direct handling of `prepend_argv`, but I doubt that was important or intentional. If callers want to control use of `prepend_argv` then we should add a new flag to `test.session.Opts`. - Move `keep` to first parameter of `n.new_session()`. - Add a `merge` flag to `test.session.Opts` - Mark `_new_argv()` as private. Test should use clear/new_session/spawn_wait instead.
* | fix(messages): better formatting for ext_messages #31839luukvbaal2025-01-03
|/ | | | | | | | | | Problem: Message grid newline formatting based on `msg_col` is not utilized with ext_messages. Solution: Increment `msg_col` with the cell width of the chunk. Allowing message code that uses `msg_col` to determine when to place a newline to do so. E.g. when the message goes beyond `Columns`; this is not necessarily where the ext_messages implementation would want to place a newline, but it is a best guess. Message parsing and manipulation is still possible.
* 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.
* vim-patch:9.1.0956: completion may crash, completion highlight wrong with ↵glepnir2024-12-24
| | | | | | | | | | | | | | | | | | | | preview window Problem: completion may crash, completion highlight wrong with preview window (after v9.1.0954) Solution: correctly calculate scroll offset, check for preview window when adding extra highlighting (glepnir) when there have a preview window prepare_tagpreview will change curwin to preview window and this may cause ComplMatchIns check condition not correct. check wp is curwin and also the type of wp is not a preview or poup info fixes: https://github.com/vim/vim/issues/16284 closes: https://github.com/vim/vim/pull/16283 https://github.com/vim/vim/commit/8d0bb6dc9f2e5d94ebb59671d592c1b7fa325ca6
* feat(ui): specify whether msg_show event is added to historyLuuk van Baal2024-12-23
| | | | | Pass along whether message in msg_show event is added to the internal :messages history.
* 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(messages): no message kind for completion menu messages #31646Tomasz N2024-12-20
|
* feat(jobs): jobstart(…,{term=true}), deprecate termopen() #31343Justin M. Keyes2024-12-19
| | | | | | | | | | | | Problem: `termopen` has long been a superficial wrapper around `jobstart`, and has no real purpose. Also, `vim.system` and `nvim_open_term` presumably will replace all features of `jobstart` and `termopen`, so centralizing the logic will help with that. Solution: - Introduce `eval/deprecated.c`, where all deprecated eval funcs will live. - Introduce "term" flag of `jobstart`. - Deprecate `termopen`.
* fix(messages): better formatting for :highlight with ext_messages #31627luukvbaal2024-12-19
| | | Also avoid going down message callstack with empty message, and remove expected grid for some tests where it did not change, and we are just testing for expected messages.
* vim-patch:9.1.0945: ComplMatchIns highlight doesn't end after inserted text ↵zeertzjq2024-12-18
| | | | | | | | | | | | (#31628) Problem: ComplMatchIns highlight doesn't end after inserted text. Solution: Handle ComplMatchIns highlight more like search highlight. Fix off-by-one error. Handle deleting text properly. (zeertzjq) closes: vim/vim#16244 https://github.com/vim/vim/commit/f25d8f9312a24da2727671560a865888812ab8d9
* vim-patch:9.1.0940: Wrong cursor shape with "gq" and 'indentexpr' executes ↵zeertzjq2024-12-18
| | | | | | | | | | | | | :normal (#31616) Problem: Wrong cursor shape with "gq" and 'indentexpr' executes :normal Solution: Update cursor and mouse shape after restoring old_State. (zeertzjq) closes: vim/vim#16241 Solution: Update cursor and mouse shape after restoring old_State. https://github.com/vim/vim/commit/6c3027744e71937b24829135ba072090d7d52bc3
* vim-patch:9.1.0942: a few typos were foundzeertzjq2024-12-18
| | | | | | | | | Problem: a few typos were found Solution: fix them (zeertzjq) closes: vim/vim#16232 https://github.com/vim/vim/commit/d32bf0a06762f9ad08334d67b4d7f235f87f9063
* vim-patch:9.1.0941: ComplMatchIns doesn't work after multibyte charszeertzjq2024-12-18
| | | | | | | | | | Problem: ComplMatchIns doesn't work after multibyte chars (after v9.1.0936) Solution: Use (ptr - line) instead of wlv.col (zeertzjq). closes: vim/vim#16233 https://github.com/vim/vim/commit/f4ccada5c372b2c14cc32490860c6995cd00268c
* feat(terminal)!: cursor shape and blink (#31562)Gregory Anders2024-12-17
| | | | | | | | | | | | | | | | | | | | | 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.
* vim-patch:9.1.0934: hard to view an existing buffer in the preview window ↵zeertzjq2024-12-17
| | | | | | | | | | | | | | | | | | | | | | (#31605) Problem: hard to view an existing buffer in the preview window Solution: add the :pbuffer command (Yinzuo Jiang) Similar as `:pedit` and `:buffer` command. `:pbuffer` edits buffer [N] from the buffer list in the preview window. `:pbuffer` can also open special buffer, for example terminal buffer. closes: vim/vim#16222 https://github.com/vim/vim/commit/a2a2fe841ed2efdbb1f8055f752a3a4d0988ae9d Cherry-pick Test_popup_and_previewwindow_dump() changes from patch 9.0.0625. Cherry-pick Run_noroom_for_newwindow_test() changes from patches 8.2.0432 and 9.0.0363. Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
* fix(messages): no message kind for :undo messages #31590Tomasz N2024-12-16
| | | | | | Problem: cannot handle `:undo` and `:redo` messages in a special way, e.g. replace one by another. Solution: add `undo` kind.
* feat(ui): sign/statuscolumn can combine highlight attrs #31575luukvbaal2024-12-14
| | | | | | | | Problem: Since e049c6e4c08a, most statusline-like UI elements can combine highlight attrs, except for sign/statuscolumn. Solution: Implement for sign/statuscolumn.
* fix(float): re-sort layers when grid zindex changed #30259glepnir2024-12-12
| | | | | | Problem: when zindex is changed in vim.schedule the zindex sort in layers not changed. Solution: resort layers when zindex changed.