aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/highlight.c
Commit message (Collapse)AuthorAge
* vim-patch:8.1.2057: the screen.c file is much too bigLewis Russell2022-08-19
| | | | | | | | | | | | | | | Problem: The screen.c file is much too big. Solution: Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#4943) https://github.com/vim/vim/commit/7528d1f6b5422750eb778dfb550cfd0b0e540964 This is an approximation vim-patch 8.1.2057. Applying the patch directly isn't feasible since our version of screen.c has diverged too much, however we still introduce drawscreen.c and drawline.c: - screen.c is now a much smaller file used for low level screen functions - drawline.c contains everything needed for win_line() - drawscreen.c contains everything needed for update_screen() Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* 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
* | Merge pull request #19828 from bfredl/nullhlbfredl2022-08-18
|\ \ | | | | | | fix(winhl): do not crash when unsetting winhl in just opened window
| * | fix(winhl): do not crash when unsetting winhl in just opened windowbfredl2022-08-18
| |/ | | | | | | fixes #19823
* / vim-patch:8.1.2082: rename popupmnu.* to popupmenu.* (#19829)zeertzjq2022-08-18
|/ | | | | | | vim-patch:8.1.2082: some files have a weird name to fit in 8.3 characters Problem: Some files have a weird name to fit in 8.3 characters. Solution: Use a nicer names. https://github.com/vim/vim/commit/30e8e73506e4522ef4aebf7d525c0e6ffe8805fd
* 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)
* vim-patch:9.0.0203: confusing variable name (#19762)zeertzjq2022-08-14
| | | | | Problem: Confusing variable name. Solution: Use "prim_aep" instead of "spell_aep". https://github.com/vim/vim/commit/c9b6570fab46bf2c246a954cfb8c0d95fe2746b3
* fix(highlight): add missing 'nocombine' to nvim_get_hl_* apis (#19586)Munif Tanjim2022-07-31
|
* refactor(object): get rid of redundant FIXED_TEMP_ARRAYbfredl2022-07-20
| | | | | use the MAXSIZE_TEMP_ARRAY + ADD_C pattern instead, as exemplified by the changes in this commit.
* perf(ui): eliminate spurious memory allocations for hl_attr_define eventbfredl2022-07-18
|
* refactor(highlight)!: rename attributes to match Vim (#19159)zeertzjq2022-06-30
| | | | | | | | | Ref: https://github.com/vim/vim/commit/84f546363068e4ddfe14a8a2a2322bb8d3a25417 Rename: - `underlineline` to `underdouble` - `underdot` to `underdotted` - `underdash` to `underdashed` `underdouble` also now takes higher precedence than `undercurl`.
* perf(highlight): don't allocate duplicates for color namesbfredl2022-06-21
|
* fix(highlight): use ctermbg/fg instead of bg/fg when use_rgb=false #18982Oliver Marriott2022-06-18
| | | | | | | | | | | | If `use_rgb` was false, we would attempt to set the `cterm_bg_color` to the variable `bg`, which is only retrieved from `bg` and `background` keys, not `ctermbg`. Same for `fg`. This means the values would be `-1` (the default, un-got value) and we'd always set the returned values to `0`. My understanding is `fg/bg` is always "gui" values, so instead we should be using `ctermbg` when needed. Nb: when looking around I think this function is currently *always* called with `use_rgb = true`.
* fix(hl): return cterm fg/bg even if they match Normal #18981Oliver Marriott2022-06-16
| | | | | | | | | | Fixes #18980 - 831fa45ad84e is related but this doesn't regress that - The `cterm_normal_fg_color != ae.cterm_fg_color` comparison is originally carried from patch to patch starting all the way back in 29bc6dfabde2 where it was avoiding setting a HL attr. But `hlattrs2dict()` now is just informational.
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* refactor(uncrustify): change rules to better align with the style guideDundar Goc2022-04-29
| | | | | | | | | | | | | Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
* vim-patch:8.1.1693: syntax coloring and highlighting is in one big file (#17721)Lewis Russell2022-03-18
| | | | | | | | | | | Problem: Syntax coloring and highlighting is in one big file. Solution: Move the highlighting to a separate file. (Yegappan Lakshmanan, closes vim/vim#4674) https://github.com/vim/vim/commit/f9cc9f209ede9f15959e4c2351e970477c139614 Name the new file highlight_group.c instead. Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* Merge pull request #17663 from dundargoc/refactor/uncrustifybfredl2022-03-11
|\ | | | | refactor: apply uncrustify
| * refactor(uncrustify): format all c filesDundar Göc2022-03-10
| |
* | refactor(decorations): move provider codeLewis Russell2022-03-10
|/ | | | Move decoration provider code to a separate file.
* refactor: remove redundant castsDundar Göc2022-03-06
|
* feat(tui): add support for `CSI 4 : [2,4,5] m`Kirill Chibisov2022-03-03
| | | | | | | | This commit finishes support for colored and styled underlines adding `CSI 4 : [2,4,5] m` support providing double, dashed, and dotted underlines Fixes #17362.
* feat(highlight): support for blend in nvim_set_hl (#17516)Lewis Russell2022-02-24
|
* fix(highlight): accept NONE as a color name (#17487)Lewis Russell2022-02-21
| | | | | | | | ... for when `ns=0`. Also update the documentation of nvim_set_hl to clarify the set behaviour. Fixes #17478
* fix(api): allow empty list for cterm in nvim_set_hlChristian Clason2022-02-17
| | | | | | | | | | | | Problem: when accessing `nvim_set_hl` from Lua, empty tables are converted to empty lists, not dictionaries, resulting in an error for :lua vim.api.nvim_set_hl(0, "Comment", { cterm = {} }) Workaround: add an empty array as a special case when checking `dict->cterm.type` and just set `cterm_mask_provided`. (Proper solution: handle this in `gen_api_dispatch.lua`.)
* feat(highlight): support color names for ctermLewis Russell2022-02-16
|
* fix(highlight): allow globals to be clearedLewis Russell2022-02-16
| | | | | | - and reduce heap allocations Fixes #17420
* feat(api): add strikethrough, nocombine to set_hlChristian Clason2022-02-12
|
* refactor(api): use a keyset for highlight dictsBjörn Linse2022-02-02
|
* feat(highlight): ns=0 to set :highlight namespaceLewis Russell2022-02-01
| | | | Passing ns=0 to nvim_set_hl will alter the `:highlight` namespace.
* vim-patch:8.1.0743: giving error messages is not flexibleJames McCoy2021-11-01
| | | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
* refactor: reduce number of unique char casts (#15995)dundargoc2021-10-12
|
* refactor: reformat with uncrustify #15736dundargoc2021-09-20
| | | | * fix function parameter comments * remove space after star in function names
* refactor(syntax): don't use pointer indirected maps for no reasonBjörn Linse2021-08-22
|
* refactor: replace TRUE/FALSE macros with C99 true/falseDundar Göc2021-07-25
|
* Merge pull request #14243 from shadmansaleh/Allow_cterm_colors_nvim_set_hlBjörn Linse2021-05-11
|\ | | | | API: Adding cterm support to nvim_set_hl
| * Make clint happy about spaces.shadmansaleh2021-03-29
| |
| * Api: Adding cterm color support to nvim_set_hlshadmansaleh2021-03-29
| |
* | Border: allow to enable/disable specific border edgesBjörn Linse2021-04-04
| |
* | luaref: free decoration providersBjörn Linse2021-04-03
|/
* floats: add borders (MS-DOS MODE)Björn Linse2021-03-22
|
* w_grid_alloc: baseline implBjörn Linse2021-03-22
|
* decorations: allow nvim_set_hl to break existing linksBjörn Linse2020-11-21
| | | | also add `default` flag to NOT break existing links/defs
* decoration: split out "decoration" from "extmark" moduleBjörn Linse2020-11-07
| | | | | Decorations will only grow more complex. move the to a separate file, so that extmark.c remains about extmarks.
* api: add API for themesBjörn Linse2020-11-01
| | | | | | | | | | co-author: hlpr98 <hlpr98@gmail.com> (dict2hlattrs function) orange is sus?? NOVEMBER DAWN erase the lie that is redraw_later()
* ui: fix problem with sattr_T overflowerw72020-08-02
| | | | | | | | | sattr_T was defined as uint16_t. But this is not enough to handle the 24-bit colors of the terminal. To solve this problem, change it to int. In 32bit, int may overflow. So, if it overflows, change it to ignore it without adding more attr_entries. fixes #12366
* API: nvim_get_hl_by_id: omit hl instead of returning -1 #11685kevinhwang912020-01-08
| | | | | | | | | Problem: When Normal highlight group defines ctermfg/bg, but other highlight group lacks ctermfg/bg, nvim_get_hl_by_id(hl_id, v:false) returns -1 for the missing ctermfg/bg instead of just omitting it. Solution: checking for -1 in hlattrs2dict() fix #11680
* highlight: correctly disable index attribute with combine/blendBjörn Linse2019-11-02
|
* terminal: enable pass through indexed colors to TUIBjörn Linse2019-11-02
|