aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui
Commit message (Collapse)AuthorAge
...
* | vim-patch:9.1.0079: LineNrAbove/Below highlighting wrong on wrapped lines ↵zeertzjq2024-02-06
| | | | | | | | | | | | | | | | | | | | | | | | | | (#27363) Problem: LineNrAbove and LineNrBelow background wrong on wrapped lines. Solution: Update number column also for wrapped part of a line. (zeertzjq) closes: vim/vim#13974 https://github.com/vim/vim/commit/ebfd856cfdf6ea0b16c8d115000961c998ce97da Cherry-pick test_number.vim changes from patch 9.0.0626.
* | docs: small fixes (#27213)dundargoc2024-02-06
| | | | | | Co-authored-by: Matthieu Coudron <886074+teto@users.noreply.github.com>
* | test: add test for 'foldcolumn' with cmdwin (#27355)zeertzjq2024-02-06
|/
* fix(redraw): update Visual selection properly with splits (#27343)zeertzjq2024-02-05
|
* fix(inccommand): update topline after moving cursor (#27341)zeertzjq2024-02-05
|
* perf(redraw): only redraw Visual area when cursor has moved (#27340)zeertzjq2024-02-05
|
* fix(keycodes): simplify S- properly when D- is present (#27316)zeertzjq2024-02-03
|
* feat(quickfix): support -q - to read 'errorfile' from stdin (#27303)zeertzjq2024-02-02
| | | Note that this only works when stdin is a pipe.
* Merge pull request #27122 from luukvbaal/signcolbfredl2024-02-01
|\ | | | | fix(column): clear "b_signcols" before moving saved marks
| * fix(column): clear "b_signcols" before moving saved marksLuuk van Baal2024-01-27
| | | | | | | | | | | | Problem: Marks moved by undo may be lost to "b_signcols.count". Solution: Count signs for each undo object separately instead of once for the entire undo.
* | feat(api): make nvim_open_win support non-floating windows (#25550)Will Hopkins2024-02-01
| | | | | | | | Adds support to `nvim_open_win` and `nvim_win_set_config` for creating and manipulating split (non-floating) windows.
* | fix(statusline): missing offset when showing 'keymap' (#27270)zeertzjq2024-01-31
| |
* | feat(extmarks): subpriorities (relative to declaration order) (#27131)Gregory Anders2024-01-28
|/ | | | | | | | | | | | | | | | | | | | | | | The "priority" field of extmarks can be used to set priorities of extmarks which dictates which highlight group a range will actually have when there are multiple extmarks applied. However, when multiple extmarks have the same priority, the only way to enforce an actual priority is through the order in which the extmarks are set. It is not always possible or desirable to set extmarks in a specific order, however, so we add a new "subpriority" field that explicitly enforces the ordering of extmarks that have the same priority. For now this will be used only to enforce priority of treesitter highlights. A single node in a treesitter tree may match multiple captures, in which case that node will have multiple extmarks set. The order in which captures are returned from the treesitter API is not _necessarily_ in the same order they are defined in a query file, so we use the new subpriority field to force that ordering. For now subpriorites are not documented and are not meant to be used by external code, and it only applies to ephemeral extmarks. We indicate the "private" nature of subpriorities by prefixing the field name with an "_".
* fix(colorscheme): use explicit normal foreground in syntax groupsEvgeni Chasnovski2024-01-25
| | | | | | | | | | | | Problem: Some core syntax highlight groups are cleared with intention to always be shown without additional highlighting. This doesn't always work as intended, especially with fallback mechanism of @-groups. Example: `Statement`/`Keyword` group shown in help code blocks (`@markup.raw`) is shown as bold (from `Statement`) cyan (from `@markup.raw`) instead of bold grey. Solution: Explicitly use normal grey foreground in syntax groups where it was previously implicitly assumed.
* feat(ui): add support for OSC 8 hyperlinks (#27109)Gregory Anders2024-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extmarks can contain URLs which can then be drawn in any supporting UI. In the TUI, for example, URLs are "drawn" by emitting the OSC 8 control sequence to the TTY. On terminals which support the OSC 8 sequence this will create clickable hyperlinks. URLs are treated as inline highlights in the decoration subsystem, so are included in the `DecorSignHighlight` structure. However, unlike other inline highlights they use allocated memory which must be freed, so they set the `ext` flag in `DecorInline` so that their lifetimes are managed along with other allocated memory like virtual text. The decoration subsystem then adds the URLs as a new highlight attribute. The highlight subsystem maintains a set of unique URLs to avoid duplicating allocations for the same string. To attach a URL to an existing highlight attribute we call `hl_add_url` which finds the URL in the set (allocating and adding it if it does not exist) and sets the `url` highlight attribute to the index of the URL in the set (using an index helps keep the size of the `HlAttrs` struct small). This has the potential to lead to an increase in highlight attributes if a URL is used over a range that contains many different highlight attributes, because now each existing attribute must be combined with the URL. In practice, however, URLs typically span a range containing a single highlight (e.g. link text in Markdown), so this is likely just a pathological edge case. When a new highlight attribute is defined with a URL it is copied to all attached UIs with the `hl_attr_define` UI event. The TUI manages its own set of URLs (just like the highlight subsystem) to minimize allocations. The TUI keeps track of which URL is "active" for the cell it is printing. If no URL is active and a cell containing a URL is printed, the opening OSC 8 sequence is emitted and that URL becomes the actively tracked URL. If the cursor is moved while in the middle of a URL span, we emit the terminating OSC sequence to prevent the hyperlink from spanning multiple lines. This does not support nested hyperlinks, but that is a rare (and, frankly, bizarre) use case. If a valid use case for nested hyperlinks ever presents itself we can address that issue then.
* fix(sign): avoid deleting from sign map while looping over it (#27158)luukvbaal2024-01-24
|
* test: typing for screen.luaLewis Russell2024-01-23
| | | | | Very rough buts resolves most diagnostic errors and should provide some useful hovers.
* fix(extmarks): crash with sign after many marksbfredl2024-01-23
| | | | fixes #27137
* fix(column): clear "b_signcols" when marktree is clearedLuuk van Baal2024-01-22
|
* feat(fold): transparent foldtextLewis Russell2024-01-22
| | | | | | | | | | | | | | | | | 'foldtext' can be set to an empty string to disable and render the line with: - extmark highlight - syntax highlighting - search highlighting - no line wrapping - spelling - conceal - inline virtual text - respects `fillchars:fold` Currently normal virtual text is not displayed Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* feat(ui): add chdir UI event (#27093)Gregory Anders2024-01-19
| | | | | | When an embedded Nvim instance changes its current directory a "chdir" UI event is emitted. Attached UIs can use this information however they wish. In the TUI it is used to synchronize the cwd of the TUI process with the cwd of the embedded Nvim process.
* fix(inccommand): improve preview buffer number handling (#27087)zeertzjq2024-01-19
|
* Merge pull request #27024 from lewis6991/test_followupLewis Russell2024-01-17
|\ | | | | test: big cleanup followup + typing
| * test: refactor PathsLewis Russell2024-01-17
| |
| * test: big cleanup followupLewis Russell2024-01-17
| | | | | | | | Followup to 07a7c0ec
* | fix(column): remove sign from line it was previously on with undoLuuk van Baal2024-01-17
| |
* | fix(column): pass kFalse when initializing "b_signcols.count"Luuk van Baal2024-01-17
|/ | | | | | | Problem: Wrong "clear" argument passed to buf_signcols_count_range when initializing "b_signcols.count" for the first time. Solution: Pass kFalse so that the "nested" counter is not incorrectly decremented.
* test: use integers for API Buffer/Window/Tabpage EXT typesLewis Russell2024-01-16
|
* fix(column): redraw 'statuscolumn' on wrapped lines with 'relativenumber'Luuk van Baal2024-01-16
| | | | | | | Problem: The 'statuscolumn' is not redrawn on the wrapped part of a line when moving the cursor with 'relativenumber' set. Solution: Redraw the 'statuscolumn' for the entire line height in the "col_rows" win_line() code path.
* fix(grid): handle clearing half a double-width char (#27023)zeertzjq2024-01-15
|
* fix(column): keep track of number of lines with number of signsLuuk van Baal2024-01-15
| | | | | | | | | | | | | | | | | | | Problem: Some edge cases to the old (pre-#26406) and current "b_signcols" structure result in an incorrectly sized "auto" 'signcolumn'. Solution: * Implement a simpler 'signcolumn' validation strategy by immediately counting the number of signs in a range upon sign insertion and deletion. Decrease in performance here but there is a clear path forward to decreasing this performance hit by moving signs to a dedicated marktree, or by adding meta-data to the existing marktree which may be queried more efficiently? * Also replace "max_count" and keep track of the number of lines with a certain number of signs. This makes it so that it is no longer necessary to scan the entire buffer when the maximum number of signs decreases. This likely makes the commit a net increase in performance. * To ensure correctness we also have re-initialize the count for an edited region that spans multiple lines. Such an edit may move the signs within it. Thus we count and decrement before splicing the marktree and count and increment after.
* fix(colorscheme): default statusline groups usability #26921Evgeni Chasnovski2024-01-13
| | | | | | | | | | | | | | | | | | Problem: Current values of `StatusLine` and `StatusLineNC` are currently designed to be visually distinctive while being not intrusive. However, the compromise was more shifted towards "not intrusive". After the feedback, statusline highlight groups should be designed to: - Make current window clearly noticeable. Meaning `StatusLine` and `StatusLineNC` should obviously differ. - Make non-current windows clearly separable. Meaning `StatusLineNC` and `Normal`/`NormalNC` should obviously differ. Solution: - Update `StatusLineNC` to have more visible background. - Update `StatusLine` to be inverted variant of `StatusLineNC`. - Update `WinBar` and `WinBarNC` to not link to `StatusLine` and `StatusLineNC` because it makes two goals harder to achieve. - Update `TabLine` to link to `StatusLineNC` instead of `StatusLine` to not be very visually intrusive.
* test: rename (meths, funcs) -> (api, fn)Lewis Russell2024-01-12
|
* test: normalise nvim bridge functionsLewis Russell2024-01-12
| | | | | - remove helpers.cur*meths - remove helpers.nvim
* test: typing for helpers.methsLewis Russell2024-01-12
|
* test: use vim.mpack and vim.uv directlyLewis Russell2024-01-12
|
* test: use vim.inspect directlyLewis Russell2024-01-12
|
* test: remove helpers.sleep()Lewis Russell2024-01-12
|
* test: do not inject vim module into global helpersLewis Russell2024-01-12
|
* fix(pum): handle right-click menu repositioning with multigrid (#26975)zeertzjq2024-01-10
|
* fix(extmarks): blending space shouldn't overwrite wide char (#26960)zeertzjq2024-01-09
|
* fix(extmarks): handle overwriting right half of wide char (#26951)zeertzjq2024-01-09
|
* fix(column): fill 'statuscolumn' clickdefs with evaluated width (#26891)luukvbaal2024-01-05
|
* fix(decorations): validate botline for on_winJaehwang Jung2024-01-04
| | | | | | | | | | | | | | | | | | | Problem: Many decoration providers (treesitter injection highlighting, semantic token highlighting, inlay hint) rely on the correctness of the `botline` argument of `on_win` callback. However, `botline` can be smaller than the actual line number of the last displayed line if some lines are folded. In such cases, some decorations will be missing in the lines not covered by `botline`. Solution: Validate `botline` when invoking `on_win`. NOTE: It seems that the old code was deliberately avoiding this presumably due to performance reasons. However, I haven't experienced noticeable lag after this change, and I believe the cost of botline computation would be much smaller than the cost of decoration providers.
* refactor: format test/*Justin M. Keyes2024-01-03
|
* refactor: fix luals warningsdundargoc2023-12-30
|
* fix(drawline): don't use temporary "v" variable when not needed (#26777)zeertzjq2023-12-28
|
* fix(column): correct width after truncated 'statuscolumn' error (#26737)luukvbaal2023-12-26
| | | | | Problem: Default number column has incorrect width after 'statuscolumn' is unset due to an error, but was also truncated. Solution: Reverse 'statuscolumn' error and truncate return branches.
* feat(extmarks): add virt_text_repeat_linebreak flag (#26625)luukvbaal2023-12-26
| | | | | | Problem: Unable to predict which byte-offset to place virtual text to make it repeat visually in the wrapped part of a line. Solution: Add a flag to nvim_buf_set_extmark() that causes virtual text to repeat in wrapped lines.
* refactor(options): remove side effects from `check_num_option_bounds()`Famiu Haque2023-12-24
|