summaryrefslogtreecommitdiffstatshomepage
path: root/test/functional/ui/multigrid_spec.lua
AgeCommit message (Collapse)AuthorFiles
2025-10-08vim-patch:9.1.1817: popup: there are some position logic bugs (#36075)zeertzjq1
Problem: popup: there are some position logic bugs Solution: Refactor position logic and fix a few bugs (Girish Palya). This change does the following: - Simplified and rewrote horizontal positioning logic (was overly complex). - Split horizontal and vertical positioning into separate functions. - Fixed missing truncation marker (e.g. `>`) when items were truncated and `pummaxwidth` was not set. - Fixed occasional extra space being added to menu items. - Update tests closes: vim/vim#18441 https://github.com/vim/vim/commit/e3ed5584ed7fad7070d49ddfba4f41bc2b22ca97 Cherry-pick pum_display_{rtl,ltr}_text() changes from patch 9.1.1835. Co-authored-by: Girish Palya <girishji@gmail.com>
2025-05-06refactor(tests): lint decorations_spec, float_spec, multigrid_spec #33274Justin M. Keyes1
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.
2025-05-04feat(messages): cleanup Lua error messagesJustin M. Keyes1
"Error" in error messages is redundant. Just provide the context, don't say "Error ...".
2025-04-21feat(options): default statusline expression #33036Shadman1
Problem: Default 'statusline' is implemented in C and not representable as a statusline expression. This makes it hard for user configs/plugins to extend it. Solution: - Change the default 'statusline' slightly to a statusline expression. - Remove the C implementation.
2025-04-15feat(ui): include compositor info with multigridFred Sundvik1
Provide compositor information, like composition index and absolute position.
2025-03-27fix(ui): send multigrid message position and size when the UI is refreshedFred Sundvik1
2025-02-09test: screen.lua can check win_pos #32373fredizzimo1
Also remove a hack in the multigrid "with winbar" test.
2025-01-14refactor: use nvim.foo.bar format for autocommand groupsMaria José Solano1
2024-11-14fix(tests): needing two calls to setup a screen is cringebfredl1
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.
2024-10-03fix(ui): ensure screen update before waiting for input #30576fredizzimo1
Ensure the screen is fully updated before blocking for input. This did not always happen before, for example when setting `cursorline scrolloff=9999`, which lead to jerky movement when using some GUI applications. Because of the duality of redraw_later, this can't be done in command-line or when waiting for "Press ENTER". In many of those cases the redraw is expected AFTER the key press, while normally it should update the screen immediately. So, those special cases are excluded.
2024-09-05feat(defaults): popupmenu "Open in browser", "Go to definition" #30261Justin M. Keyes1
- Use the popup to expose more features such as LSP and gx. - Move the copy/paste items lower in the menu, they are lower priority.
2024-05-18fix(move): half-page scrolling with resized grid at eob (#28821)zeertzjq1
2024-04-23test: improve test conventionsdundargoc1
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.
2024-04-10refactor(test): inject after_each differentlyLewis Russell1
2024-04-08test: improve test conventionsdundargoc1
Work on https://github.com/neovim/neovim/issues/27004.
2024-03-29feat(ui): indicate margins for the area used by win_viewportbfredl1
Problem: using win_viewport for implementing smooth scrolling in an external UI might run into problems when winbar or borders is used, as there is no indication that the entire grid is not used for scrolled buffer text. Solution: add `win_viewport_margins` event.
2024-03-28fix(plines): cursor position with 'showbreak' and resized grid (#28067)zeertzjq1
2024-02-15vim-patch:9.1.0106: Visual highlight hard to read with 'termguicolors'zeertzjq1
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>
2024-01-16test: use integers for API Buffer/Window/Tabpage EXT typesLewis Russell1
2024-01-12test: rename (meths, funcs) -> (api, fn)Lewis Russell1
2024-01-12test: normalise nvim bridge functionsLewis Russell1
- remove helpers.cur*meths - remove helpers.nvim
2024-01-12test: typing for helpers.methsLewis Russell1
2023-12-18fix(options): setting 'scroll' with resized grid (#26628)zeertzjq1
2023-12-09test: avoid repeated screen lines in expected stateszeertzjq1
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
2023-09-27refactor(grid): use batched updates for statusline and rulerbfredl1
2023-09-21vim-patch:9.0.1919: Wrong curswant when clicking on empty line or with vsplitszeertzjq1
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
2023-07-05fix(ui): delay win_viewport until screen update #24182fredizzimo1
Problem: Sometimes, when nvim sends the `win_viewport` event, for example when scrolling with visible folds on the screen, it reports the `scroll_delta` value one batch into "future". So when the client application is trying to show the new viewport it's not yet updated, resulting in temporary corruption / screen flickering. For more details see #23609, and starting from [this comment]( https://github.com/neovide/neovide/pull/1790#issuecomment-1518697747) in https://github.com/neovide/neovide/pull/1790,, where the issue was first detected. Note that some of the conclusions in those are not fully accurate, but the general observations are. Solution: When there are pending updates to a Window, delay the `win_viewport` UI event until the updates are sent. This ensures that there's no flush between sending the viewport and updating of the lines corresponding to the new viewport. Document the existing viewport behaviour (for cases where there are no extra flushes), give a hint about how applications can deal with the slightly surprising behaviour of the viewport event being sent after the updates. Fixes https://github.com/neovim/neovim/issues/23609
2023-07-04perf(ui-ext): approximate scroll_delta when scrolling too much (#24234)zeertzjq1
2023-07-04fix(ui-ext): "scroll_delta" handle topfill and skipcol (#24249)zeertzjq1
2023-05-21refactor(options): deprecate nvim[_buf|_win]_[gs]et_optionLewis Russell1
Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: famiu <famiuhaque@protonmail.com>
2023-05-03fix(pum): don't position too far with resized parent grid (#23442)zeertzjq1
2023-05-02fix(mouse): fix popup_setpos position check with ext_multigrid (#23436)zeertzjq1
2023-05-02fix(normal): make "g$" work properly with resized gridzeertzjq1
2023-05-02fix(drawline): make cursorlineopt=screenline work with resized gridzeertzjq1
2023-05-02fix(float): make bufpos work properly with resized parent gridzeertzjq1
2023-03-12feat(ui): add scroll_delta to win_viewport event #19270Matthias Deiml1
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
2022-11-29test: adding/removing winbar should not cause win_pos events (#21226)zeertzjq1
2022-08-24feat(eval)!: make Vim functions return inner window width and height (#19743)zeertzjq1
In non-multigrid UI the only change is that the returned height now excludes winbar, and this is compatible with Vim. In multigrid UI this means the return value of these functions now reflect the space available for buffer lines in a window. No change in nvim_win_get_height() and nvim_win_get_width().
2022-05-19fix(mouse): fix mouse drag position with winbarzeertzjq1
2022-05-18fix(ui): make winbar work with floats and multigridbfredl1
2022-05-15refactor(ui)!: link `VertSplit` to `Normal` by defaultFamiu Haque1
Avoids using `gui=reverse` on `VertSplit` and makes window separators look much nicer by default.
2021-09-10feat(api): win_viewport also sends line_count #15613Yatao Li1
2021-09-10fix(mouse.c): fix mouse drag positions on multigrid #12667Ville Hakulinen1
Currently, multigrid mouse drag positions are handled incorrectly if the drag event is not in the top left grid. Fix this by not adjusting the position of the event in jump_to_mouse. related: #15091
2021-09-08fix(multigrid): #15075 mouse events crash neovimYatao Li1
2020-12-05ui: Fix win_hide distination gridshirasaka1
When create tab, win_hide sent to new tab and new tab's previous tab. So, if created tab that not next tab (eg. $tabnew cmd), send win_hide to not current tab, and fixed this.
2020-10-19A Mudholland Dr. RecastBjörn Linse1
The commit summary maybe does not make sense, but calling a function that does not wait on anything `wait()` makes even less sense.
2020-04-01api/ui: win_viewport event for visible range and cursor position in windowBjörn Linse1
2019-10-13tests/ui: remove unnecessary screen:detach()Björn Linse1
It is perfectly fine and expected to detach from the screen just by the UI disconnecting from nvim or exiting nvim. Just keep detach() in screen_basic_spec, to get some coverage of the detach method itself. This avoids hang on failure in many situations (though one could argue that detach() should be "fast", or at least "as fast as resize", which works in press-return already). Never use detach() just to change the size of the screen, try_resize() method exists for that specifically.
2019-09-01test/ui: update tests for new msg_grid implementationBjörn Linse1
2019-08-17test/ui: properly test win_hide by explicitly marking hidden gridsBjörn Linse1