aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/highlight_spec.lua
Commit message (Collapse)AuthorAge
* 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.
* fix(options): fix 'winhl' still accepting invalid value (#30896)zeertzjq2024-10-22
|
* feat(ui): statusline text inherits highlights #29976Riley Bruins2024-10-12
| | | Changes apply to the winbar, statusline, and tabline text.
* vim-patch:9.1.0740: incorrect internal diff with empty file (#30471)zeertzjq2024-09-23
| | | | | | | | | | | | | | Problem: incorrect internal diff with an empty file Solution: Set pointer to NULL, instead of using an empty line file (Yukihiro Nakadaira) When using internal diff, empty file is read as one empty line file. So result differs from external diff. closes: vim/vim#15719 https://github.com/vim/vim/commit/f1694b439bb175d956b49da620f1253462ec507b Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
* vim-patch:9.1.0729: Wrong cursor-screenline when resizing windowzeertzjq2024-09-14
| | | | | | | | | | Problem: Wrong cursor-screenline when resizing window Solution: Invalidate saved left_col and right_col when width1 or width2 change. closes: vim/vim#15679 https://github.com/vim/vim/commit/86dc4f8b432233a01d022c3e71df53db58229713
* 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.
* refactor(test): inject after_each differentlyLewis Russell2024-04-10
|
* test: improve test conventionsdundargoc2024-04-08
| | | | Work on https://github.com/neovim/neovim/issues/27004.
* refactor(tests): use more standard colors but with extra colorsbfredl2024-04-05
|
* refactor(drawline): integrate terminal hl with eol loop (#27893)zeertzjq2024-03-17
| | | | | | | There is no test for using 'cursorline' in Normal mode in a terminal buffer, so add a test and fix 'cursorcolumn' remaining when entering Terminal mode. Also move synIDattr() tests to ui/highlight_spec.lua.
* fix(highlight): don't show CursorColumn on current line (#27848)zeertzjq2024-03-15
| | | | | | | | | | | | Problem: CursorColumn highlight behavior is inconsistent with 'virtualedit' set: - If cursor is on the text, CursorColumn is not shown. - If cursor is after end of line, CursorColumn is shown. Solution: Don't shown CursorColumn on current line if cursor is after end of line. Vim doesn't have this problem because in most cases it uses the code path for drawing buffer text when CursorColumn highlight is needed.
* vim-patch:b1427b46f5fe (#27652)zeertzjq2024-02-28
| | | | | | | | | | | | | runtime(vim): Update base-syntax, improve :echo highlighting (vim/vim#14103) - Normalise behaviour of :echo commands and improve expression matching. - Allow continued argument lines. - Refine string interpolation groups. - Remove duplicated :menu and :map generated commands that are handled specially later in the file. https://github.com/vim/vim/commit/b1427b46f5fe50a1daba102c4017d0ef2624b3ba Co-authored-by: dkearns <dougkearns@gmail.com>
* vim-patch:9.1.0106: Visual highlight hard to read with 'termguicolors'zeertzjq2024-02-15
| | | | | | | | | | | | | | | 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>
* vim-patch:9.1.0083: Redrawing can be improved when deleting lines with 'number'zeertzjq2024-02-08
| | | | | | | | | | | Problem: Redrawing can be improved when inserting/deleting lines with 'number'. Solution: Only redraw the number column of lines below changed lines. Add a test as this wasn't previously tested. (zeertzjq) closes: vim/vim#13985 https://github.com/vim/vim/commit/ae07ebc04b0726e12b1af39d52e01d86ae79ef0a
* 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>
* fix(redraw): update Visual selection properly with splits (#27343)zeertzjq2024-02-05
|
* 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
|
* refactor: format test/*Justin M. Keyes2024-01-03
|
* refactor(runtime): rewrite 'vim' color scheme in LuaEvgeni Chasnovski2023-12-21
| | | | | | | | | | Problem: Bundled 'vim' color scheme is written in Vimscript which implicitly assumes that the file is ported from Vim. This is not the case, at it is currently the Neovim's way of providing backward compatibility for color schemes. Solution: Rewrite it in Lua to indicate that this runtime file comes from Neovim.
* test: avoid repeated screen lines in expected stateszeertzjq2023-12-09
| | | | | | 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
* fix(highlight): attr set all when normal attr changedglepnir2023-10-04
|
* fix(highlight): winhl receive wrong argumentglepnir2023-09-19
|
* test(extmarks): add tests for #14201 #20004 #20885 (#23794)zeertzjq2023-05-28
|
* fix(drawline): combine extmark highligh with area hl correctlybfredl2023-05-25
| | | | | | | | | | | | | | | | | | | fixes #23734 Get rid of the weird attr_pri dance which always seemed like a kludge: if (!attr_pri) { wlv.char_attr = hl_combine_attr(wlv.char_attr, extmark_attr); } else { wlv.char_attr = hl_combine_attr(extmark_attr, wlv.char_attr); } Instead combine extmark attrs with (old-skool) syntax attrs in a consistent way and then combine that with attr_pri and the rest in an _unified_ code path fixes #23722 Co-authored-by: luukvbaal <luukvbaal@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(highlight): combine ColorColumn with low-priority CursorLine (#23017)zeertzjq2023-04-11
|
* fix(highlight): use winhl=Foo:Bar even when Bar is emptybfredl2023-04-06
| | | | fixes #22906
* test(highlight_spec): fix warning in Visual highlight test (#22719)zeertzjq2023-03-18
| | | | Problem: Warning in Visual highlight test. Solution: Don't move cursor back and forth.
* test: use a wider screen in the rightleft winhl test (#22641)zeertzjq2023-03-12
| | | With a wide screen this actually previously caused an overflow.
* fix(screen): correctly draw background and eob with 'rightleft' (#22640)zeertzjq2023-03-12
|
* fix(options): restore exists() behavior for options (#21510)zeertzjq2022-12-23
| | | | | Duplicating get_option_value() logic for an obscure future refactor isn't really worthwhile, and findoption() isn't used anywhere else outside the options code.
* fix(tests): only get the color map once, even for multiple test filesbfredl2022-11-27
| | | | | | | | | Problem: test/functional/ui/screen.lua would be reloaded for each *_spec.lua file, which causes an extra nvim session to be started to get the color map each time. solution: Mark screen.lua as a preloaded file, but defer the loading of the color map to the first time Screen object is initialised.
* fix(ui): fix some cases of stale highlight definitionsbfredl2022-11-13
| | | | fixes #20695
* vim-patch:8.2.2207: illegal memory access if popup menu items are changed ↵zeertzjq2022-11-12
| | | | | | | | | | | (#21028) Problem: Illegal memory access if popup menu items are changed while the menu is visible. (Tomáš Janoušek) Solution: Make a copy of the text. (closes vim/vim#7537) https://github.com/vim/vim/commit/38455a921395a56690790c8c1d28c1c43ca04c8a Co-authored-by: Bram Moolenaar <Bram@vim.org>
* feat(messages)!: graduate the 'msgsep' featurebfredl2022-10-05
| | | | | | | The old behaviour (e.g. via `set display-=msgsep`) will not be available. Assuming that messages always are being drawn on msg_grid (or not drawn at all, and forwarded to `ext_messages` enabled UI) will allows some simplifcations and enhancements moving forward.
* fix(highlight): set the window namespace when redrawing statuslinebfredl2022-08-30
|
* Merge pull request #19822 from bfredl/hldefbfredl2022-08-18
|\ | | | | fix(api): make nvim_set_hl(ns=0, ...) redraw screen properly
| * fix(api): make nvim_set_hl(ns=0, ...) redraw screen properlybfredl2022-08-18
| | | | | | | | fixes #18160
* | fix(winhl): do not crash when unsetting winhl in just opened windowbfredl2022-08-18
|/ | | | fixes #19823
* fix(tests): remove irrelevant usage of display-=msgsepbfredl2022-08-17
| | | | | | | | These were just added to avoid churn when changing the default of 'display'. To simplify message handling logic, we might want to remove support for printing messages in default_grid later on. This would allow things like printing error messages safely in the middle of redraw, or a future graduation of the 'multigrid' feature.
* feat(ui): allow to set the highlight namespace per windowbfredl2022-08-17
| | | | | - reimplement 'winhl' in terms of highlight namespaces - check for EOF in screen tests (to indicate a likely crash)
* fix(winbar): make setting WinBar and WinBarNC in 'winhighlight' workzeertzjq2022-07-15
|
* refactor(ui)!: link `VertSplit` to `Normal` by defaultFamiu Haque2022-05-15
| | | | | Avoids using `gui=reverse` on `VertSplit` and makes window separators look much nicer by default.
* vim-patch:8.2.4707: redrawing could be a bit more efficient (#18022)zeertzjq2022-04-07
| | | | | Problem: Redrawing could be a bit more efficient. Solution: Optimize redrawing. (closes vim/vim#10105) https://github.com/vim/vim/commit/8c9796085071950f9a03ca0fe116608e4f86aac2
* vim-patch:8.2.4660: cursorcolumn is sometimes not correctzeertzjq2022-04-01
| | | | | | | Problem: Cursorcolumn is sometimes not correct. Solution: Recompute the cursor column when entering Insert mode and the cursor is on a character wider than a screen cell. https://github.com/vim/vim/commit/782c6744b49b30d9460ed00d4773666e42e07163
* vim-patch:8.2.4630: 'cursorline' not always updated with 'culopt' is ↵zeertzjq2022-03-28
| | | | | | | | | | | "screenline" Problem: 'cursorline' not always updated with 'cursorlineopt' is "screenline". Solution: Call check_redraw_cursorline() more often. (closes vim/vim#10013) https://github.com/vim/vim/commit/bf269ed0b0bd8414eea7bea17465b2738a9a2b55 Code was reverted in patch 8.2.4638, so this just ports the test.
* vim-patch:8.2.4638: superfluous check if a redraw is needed for 'cursorline'zeertzjq2022-03-28
| | | | | | | | | Problem: Superfluous check if a redraw is needed for 'cursorline'. Solution: Remove check_redraw_cursorline(). (closes vim/vim#10030, closes vim/vim#10029) https://github.com/vim/vim/commit/3e559cd88486ffab6b6fb4e0921b4600d137a617 redraw_after_callback() is N/A. Omits changes that just revert code from patch 8.2.4630.
* vim-patch:8.2.4591: cursor line not updated when a callback moves the cursorzeertzjq2022-03-24
| | | | | | | | Problem: Cursor line not updated when a callback moves the cursor. Solution: Check if the cursor moved. (closes vim/vim#9970) https://github.com/vim/vim/commit/e7a74d53754765f22ef8ce71c915bb669d5f7f3f redraw_after_callback() is N/A. Nvim handles timers on the main loop.