aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
Commit message (Collapse)AuthorAge
...
| * lintdvejmz2018-01-09
| |
| * vim-patch:8.0.0204: compiler warns for uninitialized variabledvejmz2018-01-09
| | | | | | | | | | | | | | Problem: Compiler warns for uninitialized variable. (Tony Mechelynck) Solution: When skipping set "id" to -1. https://github.com/vim/vim/commit/eb46f8fa14a586779f55b1c7f1648f559618322e
| * vim-patch:8.0.0201: completion of highlight groups includes cleared namesdvejmz2018-01-09
| | | | | | | | | | | | | | | | Problem: When completing a group name for a highlight or syntax command cleared groups are included. Solution: Skip groups that have been cleared. https://github.com/vim/vim/commit/d61e8aaae57bd66279def479462bf11c22ec2f1c
| * vim-patch:8.0.0198dvejmz2018-01-09
|/ | | | | | | | | | Problem: Some syntax arguments take effect even after "if 0". (Taylor Venable) Solution: Properly skip the syntax statements. Make "syn case" and "syn conceal" report the current state. Fix that "syn clear" didn't reset the conceal flag. Add tests for :syntax skipping properly. https://github.com/vim/vim/commit/de318c5c35ed0d65fd2a07196cb8acd5ee6d9bf8
* *: Replace all occurrences of NVim with NvimZyX2017-11-30
|
* functests: Add some more testsZyX2017-11-26
|
* Merge branch 'master' into expression-parserZyX2017-11-26
|\
| * :highlight : avoid redraw on errornate2017-11-25
| | | | | | | | | | do_highlight() should not redraw if a validation error occurred. closes #7489
| * syntax.c: Fix maybe-uninitialized warning (#7596)Phlosioneer2017-11-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building in release mode, gcc generated a maybe-initialized warning in get_syn_options. The warning is both right and wrong; there is an execution path where the len variable is not initialized in the code: ... int len; ... for (fidx = ARRAY_SIZE(flagtab); --fidx >= 0; ) { p = flagtab[fidx].name; int i; for (i = 0, len = 0; p[i] != NUL; i += 2, ++len) if (arg[len] != p[i] && arg[len] != p[i + 1]) break; // <snip> } ... arg = skipwhite(arg + len); ... The initial for loop will not execute if ARRAY_SIZE(flagtab) == 0, and thus len will never be initialized. flagtab is a local-static variable, initialized to a long array of structured data, so ARRAY_SIZE(flagtab) can't be 0. However, gcc doesn't recognize ARRAY_SIZE(flagtab) as a constant. There are any number of reasons this could happen. In any case, the message can be fixed with a len=0 before the first for loop. In addition to the above warning, I've labeled flagtab and first_letters as const. They should never change.
* | Merge branch 'master' into expression-parserZyX2017-11-19
|\|
| * Use PRId64 to format Integer when calling api_set_errorJames McCoy2017-11-12
| | | | | | | | | | | | | | | | | | | | | | Integer is a 64-bit type so using %d can produce incorrect results. test/functional/api/highlight_spec.lua @ 35: highlight api nvim_get_hl_by_id ...W7Xi/neovim-0.2.1/test/functional/api/highlight_spec.lua:46: Expected objects to be the same. Passed in: (string) 'Invalid highlight id: 7671724' Expected: (string) 'Invalid highlight id: 30000'
| * doc: deprecate 'highlight'; remove howto.txt (#7497)Justin M. Keyes2017-11-07
| |
* | syntax: Fix duplicate group definitionsZyX2017-11-19
| |
* | unittests,syntax: Check for sanity of highlight_init_cmdlineZyX2017-11-13
| | | | | | | | Also fixes some errors found.
* | viml/parser/expressions: Add support for parsing assignmentsZyX2017-11-12
| |
* | *: Fix linter errorsZyX2017-10-30
| | | | | | | | Big function in expressions.c may be refactored, if I ever catch the idea how to split it right.
* | syntax,viml/parser/expressions: Add missing highlight groupsZyX2017-10-29
| | | | | | Also adjusts some names.
* | syntax: Adjust position and arguments of syn_init_cmdline_highlightZyX2017-10-29
| | | | | | | | | | This way it works both after `nvim -u NORC` and after that and `colorscheme wombat256mod`. Removed the comment because I do not actually know why it works here with these arguments and not in previous position with previous arguments.
* | syntax,viml/expressions/parser: Create defaults for expr highlightingZyX2017-10-29
|/
* Merge #7327 from ckelsel/vim-8.0.0131Justin M. Keyes2017-10-09
|\
| * Merge branch 'master' into vim-8.0.0131KunMing Xie2017-10-08
| |\
| * | vim-patch:8.0.0155ckelsel2017-09-28
| | | | | | | | | | | | | | | | | | | | | | | | Problem: When sorting zero elements a NULL pointer is passed to qsort(), which ubsan warns for. Solution: Don't call qsort() if there are no elements. (Dominique Pelle) https://github.com/vim/vim/commit/a216255a4faa91a15e7005ac319f2f62294f3f9e
* | | test: nvim_get_hl_by_name/by_id #7082Justin M. Keyes2017-10-08
| | | | | | | | | | | | | | | - test all properties - test failure modes
* | | Merge #7082 'api: nvim_get_hl_by_name/by_id'Justin M. Keyes2017-10-08
|\ \ \ | |_|/ |/| |
| * | Remove duplicate ATTRENTRY_INITMatthieu Coudron2017-09-30
| | |
| * | Changed prototypes to accept a boolean "rgb"Matthieu Coudron2017-09-30
| | |
| * | Increased test coverage for RGB and ctermMatthieu Coudron2017-09-30
| | |
| * | Adds nvim_get_hl_by_name/by_idMatthieu Coudron2017-09-30
| |/ | | | | | | | | | | | | | | | | ...in order to retrieve highlights. Added test/functional/api/highlight_spec.lua HL_NORMAL is not really a good name, since it's more like an empty attribute than the normal's one. If one pays attention, syn_cterm_attr2entry is never called with attr=0 because it's always special cased before. I suggest in subsequent PRs we remove the ATTR_OFF and just insert an EMPTY ATTR/RESET_ATTR/UNINITIALIZED for id 0.
* | vim-patch:8.0.0142 (#7335)KunMing Xie2017-10-07
| | | | | | | | | | | | | | | | | | see also #7082 Problem: Normal colors are wrong with 'termguicolors'. Solution: Initialize to INVALCOLOR instead of zero. (Ben Jackson, closes vim/vim#1344) https://github.com/vim/vim/commit/0cdb72aa38c4a0140c94d56bf8bc17cb30260ebf
* | vim-patch:8.0.0157 (#7362)KunMing Xie2017-10-07
|/ | | | | | Problem: No command line completion for ":syntax spell" and ":syntax sync". Solution: Implement the completion. (Dominique Pelle) https://github.com/vim/vim/commit/2d02839050a2557bf36dab37ccd9f92168a757d1
* syntax.c: styleMatthieu Coudron2017-08-22
| | | | | Converts some documentation to doxygen format + minor styling improvements.
* syntax.c: register 'Normal' highlight groupMatthieu Coudron2017-08-22
| | | | | | - :hi Normal works with -u NONE - Makes HL_TABLE and ATTR_ENTYRY a function instead of a macro so that in can be used in gdb. - Introduces ATTRENTRY_INIT to init attrentry_t
* syntax: Fix V763: parameter always rewritten before being usedZyX2017-07-04
| | | | | | | | | | This is the result of malloc error handling elimination: push_current_state() used to (not) return OK depending on whether growing garray failed or not and this return was checked, if errorred out push_next_match() will simply return its argument unchanged. Now when allocations are supposed to either always succeed or crash Neovim this check was returned, push_current_state() was stripped of its return value and moved out of if() condition, resulting in V763.
* syntax: Silence V782ZyX2017-05-20
| | | | Just another pointer hack used with hash tables.
* options: make 'highlight' read-onlyBjörn Linse2017-05-15
|
* *: Add comment to all C filesZyX2017-04-19
|
* highlight: default Cursor to guibg=fg, guifg=bgMatthieu Coudron2017-04-17
| | | | Closes #6508
* coverity/56795: Fix NULL dereference in :syn keyword non-printableZyX2017-04-09
| | | | Bug was introduced 3 years earlier, in 13848aa: NULL keyword_copy was incorrectly treated as an indicator of OOM.
* 'listchars': `Whitespace` highlight group #6367Yichao Zhou2017-04-03
|
* tui: 'guicursor' colorMatthieu Coudron2017-04-01
| | | | | | For now only supports valid hex colors (does not check for the validity the hex color) when termguicolors is set, otherwise it won't attempt to change the cursor color.
* tui: 'guicursor' shape #6044Matthieu Coudron2017-04-01
| | | | Closes #2583
* *: Use const char * in set_one_cmd_contextZyX2017-03-29
| | | Also renames functions added in master and renamed here.
* syntax: Fix linter errorZyX2017-03-29
|
* *: Make some more things const and with lengthZyX2017-03-29
|
* eval,*: Move get_tv_string to typval.cZyX2017-03-29
| | | | Function was renamed and changed to return `const char *`.
* *: Move some dictionary functions to typval.h and use char*ZyX2017-03-29
| | | | Also fixes buffer reusage in setmatches() and complete().
* *: Fix linter errorsZyX2017-02-15
|
* *: Partial string handling refactoringZyX2017-02-15
| | | | | | | | Main points: - Replace `char_u` with `char` in some cases. - Remove `str[len] = NUL` hack in some cases when `str` may be considered `const`.
* refactor: Remove strncpy/STRNCPY. (#6008)Justin M. Keyes2017-01-26
| | | | | | | | | | | | | | | Closes #731 References #851 Note: This does not remove some intentional legacy usages of strncpy. - memcpy isn't equivalent because it doesn't check the string length of `src`, and doesn't zero-out the remainder of `dst`. - xstrlcpy isn't equivalent because it doesn't zero-out the remainder of `dst`. Some Vim logic depends on that (e.g. ex_append which calls vim_strnsave). Helped-by: Douglas Schneider <ds3@ualberta.ca> Helped-by: oni-link <knil.ino@gmail.com> Helped-by: James McCoy <jamessan@jamessan.com>
* refactor: Replace vim_strcat() with xstrlcat().Justin M. Keyes2017-01-23
|