aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/float_spec.lua
Commit message (Collapse)AuthorAge
...
* fix(help): :help can focus unfocusable/hide window #34442phanium2025-06-29
| | | | | | | Problem: :help/:helpgrep/:lhelpgrep can focus unfocusable/hide window Solution: Ignore unfocusable/hidden window when reusing help buffer.
* fix(highlight): spurious underline in 'winblend' floating window #34614glepnir2025-06-27
| | | | | | | | Problem: When a floating window with high winblend uses a highlight group with underline (but without guisp), the underline appears red. Solution: Only blend the special color (for underline/undercurl) if the foreground highlight actually has underline or undercurl set. Otherwise, ignore the special color.
* fix(cmd): bar "|" not allowed after :fclose #34613glepnir2025-06-23
| | | | Problem: `:fclose` command failed when used with trailing `|` bar. Solution: Add `TRLBAR` flag to fclose command to support trailing bar.
* fix(float): ensure relative window grid is allocated (#34459)luukvbaal2025-06-12
| | | | | Problem: Uninitialized grid for a "win" relative float when redrawing just after it has been opened. Solution: Ensure window grid is allocated or assigned the default grid.
* fix(highlight): preserve background transparency in 'winblend' #34302glepnir2025-06-09
| | | | | | | | | | Problem: When using 'winblend', transparent backgrounds (-1) are forced to default colors (usually black) during attribute blending, breaking the transparency effect. Solution: Check original background colors before blending in hl_blend_attrs(). If both background and foreground originally had transparent backgrounds, preserve transparency instead of forcing default colors.
* test: remove unnecessary line breaks #34369glepnir2025-06-08
| | | | Problem: The test included too many unnecessary line breaks. Solution: Remove the extra line breaks to make the test code more concise.
* fix(api): ensure win_get_config() "border" is reciprocal (#34322)luukvbaal2025-06-06
| | | | | | | | | fix(api): ensure win_get_config() is reciprocal Problem: win_get_config() does not include a 'none' border field, causing nvim_open_win() to apply the 'winborder' value. Solution: Include a 'none' border field in the returned config, such that it can be used reciprocally in nvim_open_win() to yield the same window layout.
* fix(api): adjust fix for reconfiguring float "relative" (#34287)luukvbaal2025-06-03
| | | | | | | Problem: "win" is cleared in float config after 96330843, even with unchanged "relative". Solution: Don't clear "win". Avoid erroring for deleted "win" by setting the parent win to curwin directly when "win" is zero or not present in config.
* fix(api): reconfiguring float "relative" does not clear "win" (#34271)luukvbaal2025-06-02
| | | | | | Problem: Unable to change the "relative" of a flag after its target "win" no longer exists. Solution: Unset target window if it is not present in config and reconfigured "relative" no longer expects a target window.
* fix(eval): winnr('$') counts non-current hidden/unfocusable windows #34207luukvbaal2025-06-01
| | | | | | | | | | | Problem: Non-visible/focusable windows are assigned a window number, whereas commands that use this window number skip over them. Solution: Skip over non-visible/focusable windows when computing the window number, unless it is made the current window through the API in which case an identifiable window number is still useful. This also ensures it matches the window number of the window entered by `<winnr>wincmd w` since 403fcacf.
* vim-patch:9.1.1408: not easily possible to complete from register content ↵glepnir2025-05-28
| | | | | | | | | | | (#34198) Problem: not easily possible to complete from register content Solution: add register-completion submode using i_CTRL-X_CTRL-R (glepnir) closes: vim/vim#17354 https://github.com/vim/vim/commit/0546068aaef2b1a40faa2945ef7eba249739f219
* refactor(tests): lint decorations_spec, float_spec, multigrid_spec #33274Justin M. Keyes2025-05-06
| | | | | | | | | Problem: decorations_spec.lua, float_spec.lua, multigrid_spec.lua are not auto-formatted. Solution: Add a special `formatlua2` cmake target, which invokes `stylua` with an alternative `.stylua2.toml` config.
* fix(window): skip unfocusable and hidden floats with "{count}<C-W>w" #33810Sean Dewar2025-05-03
| | | | | | | | | | Problem: Using `<C-W>w`, `<C-W>W` or the ":wincmd" variants with a count can enter unfocusable or hidden floating windows. This is especially problematic when using the new in-development extui, which creates many unfocusable floats for various UI elements. Solution: Skip unfocusable and hidden floating windows. Instead, skip to the next focusable, non-hidden window in the current tabpage's window list. Reword the documentation a bit (hopefully an improvement?)
* fix(ui): correct condition for "wrap" flag in a floating gridbfredl2025-04-30
| | | | | | | | In a floating window grid, "wrap" flag should not be set when vertical borders are used, as the the wrapped text will be broken up by border chars. fixes #33719
* docs: lsp, emoji, startup #33446Justin M. Keyes2025-04-27
| | | Co-authored-by: Maria José Solano <majosolano99@gmail.com>
* fix(winblend): treat braille blank (\u2800) as whitespace #32741Skoh2025-04-23
| | | | | | | Problem: 'winblend' does not display text behind blank unicode characters other than 0x20 ascii space. Solution: In ui_compositor.c -> compose_line() check for either 0x20 or 0x80A0E2 (utf8 \u2800).
* fix(float): cursor visible in "hidden" floating window #30866glepnir2025-04-23
| | | | | | | | Problem: Cursor is visible in "hidden" floating window. Solution: Hide cursor when curwin is a hidden floating window. Show cursor after returning to a normal (non-hidden) window.
* feat(ui): include compositor info with multigridFred Sundvik2025-04-15
| | | | | Provide compositor information, like composition index and absolute position.
* test(float): restore border tests (#33222)zeertzjq2025-03-31
|
* feat(float): 'winborder' "bold" style #33189glepnir2025-03-31
|
* fix(api): don't use 'winborder' when reconfiguring float (#32984)glepnir2025-03-19
| | | | | | Problem: Reconfiguring a float window applies the global 'winborder'. Solution: - Ignore 'winborder' when reconfiguring a float window. - Still apply 'winborder' when converting a split to a float window.
* feat(float): add winborder option (#31074)glepnir2025-03-18
| | | | | | | | | Problem: There is currently no global option to define the default border style for floating windows. This leads to repetitive code when developers need consistent styling across multiple floating windows. Solution: Introduce a global option winborder to specify the default border style for floating windows. When a floating window is created without explicitly specifying a border style, the value of the winborder option will be used. This simplifies configuration and ensures consistency in floating window appearance. Co-authored-by: Gregory Anders <greg@gpanders.com>
* feat(lua): vim.text.indent()Justin M. Keyes2025-02-26
| | | | | | | | | | | | | Problem: Indenting text is a common task in plugins/scripts for presentation/formatting, yet vim has no way of doing it (especially "dedent", and especially non-buffer text). Solution: Introduce `vim.text.indent()`. It sets the *exact* indentation because that's a more difficult (and thus more useful) task than merely "increasing the current indent" (which is somewhat easy with a `gsub()` one-liner).
* fix(float): can set title/footer without setting border #32594Evgeni Chasnovski2025-02-23
| | | | | | | | | Problem: setting title and/or footer without explicitly setting border shows "title/footer/ requires border to be set" error. At the same time, explicitly setting `border = "none"` (which is default) shows expected no-border-no-title-no-footer window without error. Solution: allow setting title/footer without explicitly setting border.
* fix(float): "Not enough room" error for 1-line float #25192glepnir2025-02-14
| | | | | | | | | Problem: set winbar on a floating window which only have one row will cause crash. Solution: when new floating window only have one room don't copy winbar from target window" Fix #19464
* 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(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.
* 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(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.
* 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.
* feat(float): allow enabling mouse for non-focusable window (#30844)zeertzjq2024-10-20
| | | | Problem: Cannot allow mouse interaction for non-focusable float window. Solution: Add a "mouse" field to float window config.
* fix(float): properly find last window of tabpage (#30571)zeertzjq2024-09-29
|
* fix(window): making float with title/footer non-float leaks memory (#30551)zeertzjq2024-09-28
|
* fix(window): respect hide flag of float windows when switching (#30507)glepnir2024-09-28
|
* fix(highlight): floating windows inherit NormalFloat from global-nsglepnir2024-09-10
| | | | | | | | | | | | | | Problem: floating windows did not correctly inherit the NormalFloat highlight group from the global namespace when it was not defined in the window-specific namespace. This led to floating windows losing their background highlight when switching between namespaces. Solution: Updated the window highlight logic in update_window_hl() to handle the fallback. This fix resolves issues with floating window backgrounds not displaying as expected in certain namespace configurations.
* fix(api): error properly with invalid field in nvim_open_win (#30078)zeertzjq2024-08-17
|
* feat(column)!: rework 'statuscolumn' %r/l itemsLuuk van Baal2024-06-16
| | | | | | | Problem: A custom 'statuscolumn' needs to check a bunch of options and placed signs to replicate the default number column. Solution: Rework %l item to include the necessary logic to mimic the default number column. Remove now redundant %r item.
* fix(float): missing default highlight for titleglepnir2024-05-25
| | | | | | Problem: there is missing default title highlight when highlight not defined in title text chunk. Solution: when attr is not set use default title highlight group.
* fix(api): make getting explicit empty hl in virtual text work (#28697)zeertzjq2024-05-12
|
* feat(api): allow floats to be opened in non-current tabpage (#28480)Will Hopkins2024-04-25
| | | \
* 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 #28434 from glepnir/23120bfredl2024-04-22
|\ | | | | fix(float): wrong position when bufpos is out of range
| * fix(float): wrong position when bufpos is setglepnir2024-04-21
| | | | | | | | | | | | Problem: when lnum in bufpos is out of range the position of float is wired. Solution: avoid the height value out of buffer line range.
* | fix(window): don't go to unfocusable float when closing (#28455)zeertzjq2024-04-22
|/
* fix(float): improve error message when reconfig failed (#25076)Raphael2024-04-13
| | | | Problem: The current error message isn't very accurate. Solution: Improve the error message.
* Merge pull request #26774 from glepnir/24129bfredl2024-04-12
|\ | | | | fix(float): don't relative float win itself
| * fix(float): don't relative flaot win itselfglepnir2024-04-10
| | | | | | | | | | | | Problem: when reconfig current float win without win key in nvim_win_set_config will cause float win position changed when move. Solution: don't relative itself.
* | refactor(test): inject after_each differentlyLewis Russell2024-04-10
|/
* test: improve test conventionsdundargoc2024-04-08
| | | | Work on https://github.com/neovim/neovim/issues/27004.