aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/highlight_spec.lua
Commit message (Collapse)AuthorAge
* 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.
* test: add a Lua screen test for CursorLineNr in diff modezeertzjq2022-03-08
| | | | Remove a useless test added in #14190
* test: convert some colorcolumn tests to Lua screen testszeertzjq2022-02-12
|
* fix(highlight): always update window highlight if highlight changedzeertzjq2021-12-07
|
* vim-patch:8.1.2229: color number column above/below cursor #15409zeertzjq2021-08-27
| | | | | Problem: Cannot color number column above/below cursor differently. Solution: Add LineNrAbove and LineNrBelow. (Shaun Brady, closes vim/vim#624) https://github.com/vim/vim/commit/efae76ab1a43d5a628d8c2fa4218ace6ba597f5d
* vim-patch:8.2.3295: 'cursorline' should not apply to 'breakindent' #15281zeertzjq2021-08-16
| | | | | | Problem: 'cursorline' should not apply to 'breakindent'. Solution: Make 'cursorline' apply to 'breakindent' and 'showbreak' consistently. (closes vim/vim#8684) https://github.com/vim/vim/commit/4f33bc20d7d5444e44d13f954e8219ad1abd26ef
* fixup! fix(highlight): remove syncolor.vimGregory Anders2021-07-28
|
* Fix a failing test (highlight_spec.lua)Andy K. Massimino2021-03-20
|
* screen.c: Allow showbreak to override cursorline. (#13372)shade-of-noon2020-11-25
| | | | | I also added relevant tests. Close #13369
* options: winhighlight: fix incorrect string equality testBjörn Linse2020-01-28
|
* tests/ui: remove unnecessary screen:detach()Björn Linse2019-10-13
| | | | | | | | | | | | | 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.
* vim-patch:8.0.0914: highlight attributes are always combined (#10256)Daniel Hahler2019-09-26
| | | | | | | | | Problem: Highlight attributes are always combined. Solution: Add the 'nocombine' value to replace attributes instead of combining them. (scauligi, closes vim/vim#1963) https://github.com/vim/vim/commit/0cd2a94a4030f6bd12eaec44db92db108e33c913 Closes https://github.com/neovim/neovim/pull/10256.
* Fix "precedes" listchar behavior in wrap modeZach Wegner2019-09-21
| | | | | | | | | | | | Previously, the "precedes" character would be rendered on every row when w_skipcol > 0 (i.e., when viewing a single line longer than the entire screen), instead of just on the first row. Make sure to only render it on the first row in this case. Add a test for this behavior. Fix documentation for the "precedes" character, which erroneously stated that it was only active when wrap mode was off.
* syntax, TUI: support "strikethrough"Jaskaran Singh2019-09-13
| | | | | | fix #3436 Includes: vim-patch:8.0.1038: strike-through text not supported
* test/ui: update tests for new msg_grid implementationBjörn Linse2019-09-01
|
* highlight: expose builtin highlight groups using hl_group_set eventBjörn Linse2019-07-14
|
* vim-patch:8.1.1072: extending sign and foldcolumn below the text is ↵Marco Hinz2019-04-03
| | | | | | | | | | | | confusing (#9816) Problem: Extending sign and foldcolumn below the text is confusing. Solution: Let the sign and foldcolumn stop at the last text line, just like the line number column. Also stop the command line window leader. (Christian Brabandt) https://github.com/vim/vim/commit/8ee4c01b8c79a29065c1af05e5d9c0721069765f Closes https://github.com/neovim/neovim/issues/9613
* vim-patch:8.1.{0849,1001}: 'cursorline' highlight #9757Justin M. Keyes2019-03-19
| | | | | | | | | | | | | | | | - Lua test correctly fails when 8.1.0849 is reverted. - 8.1.1001 bug does not manifest in Neovim. vim-patch:8.1.0849: cursorline highlight is not always updated Problem: Cursorline highlight is not always updated. Solution: Set w_last_cursorline when redrawing. Fix resetting cursor flags when using the popup menu. https://github.com/vim/vim/commit/c07ff5c60ad35982e9cdaa9dd72d3d1669935e87 vim-patch:8.1.1001: Visual area not correct when using 'cursorline' Problem: Visual area not correct when using 'cursorline'. Solution: Update w_last_cursorline also in Visual mode. (Hirohito Higashi, closes vim/vim#4086) https://github.com/vim/vim/commit/8156ed37558231a8167a1a61a147713d84c9af59
* vim-patch:8.1.0994: fix relative cursor position #9676Justin M. Keyes2019-03-09
| | | | | | Problem: Relative cursor position is not calculated correctly. Solution: Always set topline, also when window is one line only. (Robert Webb) Add more info to getwininfo() for testing. https://github.com/vim/vim/commit/8fcb60f961bdd134599fb016c6537fd496e800f5
* Visual: highlight char-at-cursorJustin M. Keyes2019-01-04
| | | | | | | | | | | | | | | Decide whether to highlight the visual-selected character under the cursor, depending on 'guicursor' style: - Highlight if cursor is blinking or non-block (vertical, horiz). - Do NOT highlight if cursor is non-blinking block. Traditionally Vim's visual selection does "reverse mode", which perhaps conflicts with the non-blinking block cursor. But 'guicursor' defaults to a vertical bar for selection=exclusive, and this confuses users who expect to see the text highlighted. closes #8983
* highlight: Fix missing .rgb_sp_color in initializers (#9287)Justin M. Keyes2018-11-30
| | | | | | | terminal_get_line_attributes() had this bug for a long time, though it likely had no effect visible to users. ref #9028 ref 60f845ca55a1
* diff/highlight: Fix GUI highlight for low-priority CursorLine (#9281)Justin M. Keyes2018-11-28
| | | | ref #9028 ref 0653ed63a508
* diff/highlight: Show underline for low-priority CursorLineJustin M. Keyes2018-11-27
|
* ui: disable clearing almost everywhereBjörn Linse2018-10-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid clearing the screen in most situations. NOT_VALID should be equivalent to CLEAR unless some external force messed up the terminal, for these situations <c-l> and :mode will still clear the screen. Also eliminate some obsolete code in screen.c, that dealt with that in vim drawing window 1 can mess up window 2, but this never happens in nvim. But what about slow terminals? There is two common meanings in which a terminal is said to be "slow": Most commonly (and in the sense of vim:s nottyfast) it means low bandwidth for sending bytes from nvim to the terminal. If the screen is very similar before and after the update_screen(CLEAR) this change should reduce bandwidth. If the screen is quite different, but there is no new regions of contiguous whitespace, clearing doesn't reduce bandwidth significantly. If the new screen contains a lot of whitespace, it will depend of if vsplits are used or not: as long as there is no vsplits, ce is used to cheaply clear the rest of the line, so full-screen clear is not needed to reduce bandwith. However a left vsplit currently needs to be padded with whitespace all the way to the separator. It is possible ec (clear N chars) can be used to reduce bandwidth here if this is a problem. (All of this assumes that one doesn't set Normal guibg=... on a non-BCE terminal, if you do you are doomed regardless of this change). Slow can also mean that drawing pixels on the screen is slow. E-ink screens is a recent example. Avoiding clearing and redrawing the unchanged part of the screen will always improve performance in these cases.