aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/float_spec.lua
Commit message (Collapse)AuthorAge
* fix(float): apply 'winblend' to title/footer highlight (#25999)zeertzjq2023-11-12
|
* fix(highlight): apply 'winblend' to float border (#25981)zeertzjq2023-11-11
|
* fix(float): win_get_bordertext_col returning negative column number (#25752)nwounkn2023-10-26
| | | | | | | | Problem: `win_get_bordertext_col` returns column < 1 for right or center aligned text, if its length is more than window width. Solution: Return max(resulting_column, 1)
* vim-patch:8.1.0822: peeking and flushing output slows down execution (#25629)zeertzjq2023-10-14
| | | | | | | Problem: Peeking and flushing output slows down execution. Solution: Do not update the mode message when global_busy is set. Do not flush when only peeking for a character. (Ken Takata) https://github.com/vim/vim/commit/cb574f415486adff645ce384979bfecf27f5be8c
* refactor(float): rename ex_floatclose to ex_fclose (#25596)Raphael2023-10-11
|
* feat(float): add fclose commandglepnir2023-10-10
|
* feat(float): support toggle show float windowglepnir2023-09-30
|
* fix(float): fix some other crashes with :unhide or :all (#25328)zeertzjq2023-09-23
|
* fix(unhide): close floating windows first (#25318)zeertzjq2023-09-23
|
* fix(ui): handle virtual text with multiple hl in more cases (#25304)zeertzjq2023-09-22
|
* fix(mouse): click on empty line with 'foldcolumn'zeertzjq2023-09-21
|
* test(ui/float_spec): click in bordered float sets correct curswantzeertzjq2023-09-21
|
* vim-patch:9.0.1919: Wrong curswant when clicking on empty line or with vsplitszeertzjq2023-09-21
| | | | | | | | | | Problem: Wrong curswant when clicking on empty line or with vsplits. Solution: Don't check for ScreenCols[] before the start of the window and handle empty line properly. closes: vim/vim#13132 https://github.com/vim/vim/commit/03cd697d635f1b0e7ffe21cf8244a8fb755f2ddb
* Merge pull request #25096 from glepnir/float_winnewbfredl2023-09-20
|\ | | | | fix(float): trigger winnew event when float window create
| * fix(float): trigger winnew event when float window createglepnir2023-09-19
| |
* | fix(float): make "fixed" work with relative=win (#25243)zeertzjq2023-09-19
| |
* | Merge pull request #25148 from glepnir/fixed_optbfredl2023-09-19
|\ \ | |/ |/| fix(float): add fixed option
| * fix(float): add fixd optionglepnir2023-09-18
| |
* | Merge pull request #25078 from glepnir/aubfredl2023-09-16
|\ \ | |/ |/| fix(float): don't trigger au event when enter is false
| * fix(ui): doesn't trigger au event when enter is falseglepnir2023-09-15
| |
* | fix(float): update position of anchored windows first (#25133)zeertzjq2023-09-14
|/
* feat(float): implement footerEvgeni Chasnovski2023-08-26
| | | | | | | | Problem: Now way to show text at the bottom part of floating window border (a.k.a. "footer"). Solution: Allows `footer` and `footer_pos` config fields similar to `title` and `title_pos`.
* refactor(change): do API changes to buffer without curbuf switchbfredl2023-08-26
| | | | | | | | | | | | | | | | | | | | | | | Most of the messy things when changing a non-current buffer is not about the buffer, it is about windows. In particular, it is about `curwin`. When editing a non-current buffer which is displayed in some other window in the current tabpage, one such window will be "borrowed" as the curwin. But this means if two or more non-current windows displayed the buffers, one of them will be treated differenty. this is not desirable. In particular, with nvim_buf_set_text, cursor _column_ position was only corrected for one single window. Two new tests are added: the test with just one non-current window passes, but the one with two didn't. Two corresponding such tests were also added for nvim_buf_set_lines. This already worked correctly on master, but make sure this is well-tested for future refactors. Also, nvim_create_buf no longer invokes autocmds just because you happened to use `scratch=true`. No option value was changed, therefore OptionSet must not be fired.
* fix(ui_compositor): only reset skipstart at first column (#24776)zeertzjq2023-08-18
| | | | | | | Problem: A double-width char in a floating window causes an extra space to be drawn to the left of its boundary. Solution: Only reset skipstart at the first column. Fix #24775
* fix(events)!: trigger CursorMoved later on switching window (#23711)zeertzjq2023-06-04
|
* 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(highlight): apply 'winblend' to NormalNC (#23555)zeertzjq2023-05-10
|
* fix(pum): make :popup position correctly with float borderzeertzjq2023-04-28
|
* fix(ruler): show ruler of curwin with no statusline in cmdlineSean Dewar2023-04-17
| | | | | | | | | | | | | | | | | | | | | Problem: After neovim/neovim@846a056, only the ruler for current floating or last window without a statusline is drawn in the cmdline. This means that if the current window is not one of these, but has no statusline, its ruler will not be drawn anymore. Solution: Make `showmode()` draw the ruler of the current window or the last window in the cmdline if it has no statusline. This also maintains the previously restored floating window case (`float->w_status_height` should be 0). This behaviour should again match Vim, but without the overdraw it seems to do to achieve the same effect; it calls `showmode()` to draw the ruler for the last window without a statusline, then may draw over it in `showruler()` (which is now `show_cursor_info_later()` in Nvim) to show the ruler for the current window..? It's very confusing. Also update the logic in `win_redr_ruler()` to mirror the check done in `showmode()`, so that the ruler doesn't potentially draw over the long ins-completion mode message in some cases.
* vim-patch:9.0.1461: ruler not drawn correctly when using 'rulerformat'Sean Dewar2023-04-17
| | | | | | | | | | | | | | | Problem: Ruler not drawn correctly when using 'rulerformat'. Solution: Adjust formatting depending on whether the ruler is drawn in the statusline or the command line. (Sean Dewar, closes vim/vim#12246) https://github.com/vim/vim/commit/fc8a601c3251c0388a88c1235b18c529385f7196 This issue was made apparent after neovim/neovim@0f1e2b6, as `showmode()` calls `win_redr_ruler()` with `curwin` now if it's floating, rather than the last window if there's no statusline (which usually already shares its right side with that of the editor). Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
* Merge pull request #22865 from MunifTanjim/issue-20370bfredl2023-04-10
|\ | | | | fix(api): do not re-apply win_config.style when missing
| * fix(api): do not re-apply win_config.style when missingMunif Tanjim2023-04-10
| |
* | Merge pull request #22910 from bfredl/nonormalbfredl2023-04-06
|\ \ | | | | | | fix(highlight): use winhl=Foo:Bar even when Bar is empty
| * | fix(highlight): use winhl=Foo:Bar even when Bar is emptybfredl2023-04-06
| |/ | | | | | | fixes #22906
* / 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.
* fix(float): remove -1 in height clampPatrick McFarland2023-03-19
| | | | | | | | | | | Problem: Clamp for height in floating windows enforced no more than editor height - 1, disallowing full editor height floating windows when using cmdheight=0 Solution: Clamp to full height, removing the -1. Tested to give the intended results with cmdheight=0, 1, or more than 1. This also inadvertently fixes a rendering error with cmdheight >1 where the bottom border would be overlapped by the cmdline.
* fix(screen): redraw the ruler for a current floating windowbfredl2023-03-14
| | | | | | | Semi-regression. The "ruler" behavior for a floating window was never really specified but in practice followed the users cursor movements in normal mode in a focused float, which seems like a reasonable behavior to now specify.
* test(float_spec): add missing sum_scroll_delta #22648zeertzjq2023-03-12
|
* 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
* fix(screen): correctly draw background and eob with 'rightleft' (#22640)zeertzjq2023-03-12
|
* fix(sleep): correct cursor placement (#22639)zeertzjq2023-03-12
| | | Just setcursor_mayforce(true) is enough as Nvim uses msg_grid.
* revert: "refactor(win_close): remove "force", don't pass on "free_buf" ↵zeertzjq2023-01-24
| | | | | | | | (#21921)" (#21979) This reverts commit 0371d0f7afa5e01dd2ac8bbd3abcf0f7454872b3. > 'bufhidden' option exists. I don't think we should assume autoclosing windows are fine just because 'hidden' is set.
* refactor(win_close): remove "force", don't pass on "free_buf" (#21921)zeertzjq2023-01-23
| | | | | | | | | | | | | Problem: The "force" flag of win_close() complicates the code and adds edge cases where it is not clear what the correct behavior should be. The "free_buf" flag of win_close() is passed on to float windows when closing the last window of a tabpage, which doesn't make much sense. Solution: Remove the "force" flag and always close float windows as if :close! is used when closing the last window of a tabpage, and set the "free_buf" flag for a float window based on whether its buffer can be freed. As 'hidden' is on by default, this change shouldn't affect many people.
* fix(statuscolumn): fix sign column highlights (#21727)luukvbaal2023-01-11
| | | Resolve #21726.
* feat(float): open float relative to mouse #21531Sebastian Lyng Johansen2023-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No easy way to position a LSP hover window relative to mouse. Solution: Introduce another option to the `relative` key in `nvim_open_win()`. With this PR it should be possible to override the handler and do something similar to this https://github.com/neovim/neovim/pull/19481#issuecomment-1193248674 to have hover information displayed from the mouse. Test case: ```lua local util = require('vim.lsp.util') local function make_position_param(window, offset_encoding) window = window or 0 local buf = vim.api.nvim_win_get_buf(window) local row, col local mouse = vim.fn.getmousepos() row = mouse.line col = mouse.column offset_encoding = offset_encoding or util._get_offset_encoding(buf) row = row - 1 local line = vim.api.nvim_buf_get_lines(buf, row, row + 1, true)[1] if not line then return { line = 0, character = 0 } end if #line < col then return { line = 0, character = 0 } end col = util._str_utfindex_enc(line, col, offset_encoding) return { line = row, character = col } end local make_params = function(window, offset_encoding) window = window or 0 local buf = vim.api.nvim_win_get_buf(window) offset_encoding = offset_encoding or util._get_offset_encoding(buf) return { textDocument = util.make_text_document_params(buf), position = make_position_param(window, offset_encoding), } end local hover_timer = nil vim.o.mousemoveevent = true vim.keymap.set({ '', 'i' }, '<MouseMove>', function() if hover_timer then hover_timer:close() end hover_timer = vim.defer_fn(function() hover_timer = nil local params = make_params() vim.lsp.buf_request( 0, 'textDocument/hover', params, vim.lsp.with(vim.lsp.handlers.hover, { silent = true, focusable = false, relative = 'mouse', }) ) end, 500) return '<MouseMove>' end, { expr = true }) ```
* fix(ui): set stc to empty in floatwin with minimal style (#21720)Raphael2023-01-10
| | | fix(ui): set stc to emtpy in floatwin with minimal style
* fix(ui): add test caseRaphael2023-01-09
|
* fix(win_close): remove float grid after closing buffer (#21551)zeertzjq2022-12-27
| | | | It is not safe to remove the float grid when autocommands can still be triggered, as autocommands may use the float grid.
* fix(float): fix crash with bufpos and non-existent window (#21319)zeertzjq2022-12-07
|
* test: add more tests for float window bufpos (#21318)zeertzjq2022-12-07
|