aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
Commit message (Collapse)AuthorAge
...
* ui: use line-based rather than char-based updates in screen.cBjörn Linse2018-07-21
| | | | | | | | | | | | | Add ext_newgrid and ext_hlstate extensions. These use predefined highlights and line-segment based updates, for efficiency and simplicity.. The ext_hlstate extension in addition allows semantic identification of builtin and syntax highlights. Reimplement the old char-based updates in the remote UI layer, for compatibility. For the moment, this is still the default. The bulitin TUI uses the new line-based protocol. cmdline uses curwin cursor position when ext_cmdline is active.
* highlight: refactor to use stateful representationBjörn Linse2018-07-21
| | | | | This allows us to keep track of the source higlight groups, and not only the final combined highlights.
* highlight: extract low-level highlight logic from syntax, uiBjörn Linse2018-07-21
|
* startup: fix ":if 0|syntax on|endif" bug (#8731)Justin M. Keyes2018-07-18
| | | | | | | Problem: ":if 0|syntax {on,off}|endif" skips the default of "syntax on" because the executor was setting the `did_syntax_onoff` flag even though "syntax {on,off}" is not actually executed. closes #8728
* vim-patch:8.0.0640: mismatch between help and actual messageJan Edmund Lazo2018-07-03
| | | | | | Problem: Mismatch between help and actual message for ":syn conceal". Solution: Change the message to match the help. (Ken Takata) https://github.com/vim/vim/commit/83064068eaabf75a7d235b0eec561dccbcb96b31
* *: Replace b_changedtick with new always-inline functionsZyX2018-06-22
| | | Ref #8474
* vim-patch:8.0.0616: not always setting 'background' correctly after :hi ↵Jan Edmund Lazo2018-06-21
| | | | | | | | | | | | | | Normal (#8606) Problem: When setting the cterm background with ":hi Normal" the value of 'background' may be set wrongly. Solution: Check that the color is less than 16. Don't set 'background' when it was set explicitly. (Lemonboy, closes vim/vim#1710) https://github.com/vim/vim/commit/1615b36b91b094263240d7b555283ddf33208f62 Restore reset_option_was_set(), removed in 419da839e0cbdf6251bc31dc218fa629ccc91b44 ref #8595 ref #8597
* syntax: refactor syn_finish_line to return boolJan Edmund Lazo2018-06-16
|
* vim-patch:8.0.0481: unnecessary if statementJan Edmund Lazo2018-06-16
| | | | | | | Problem: Unnecessary if statement. Solution: Remove the statement. Fix "it's" vs "its" mistakes. (Dominique Pelle, closes vim/vim#1568) https://github.com/vim/vim/commit/aab93b12cb54fbe5efe9e8f6fde1c46802a3031e
* vim-patch:8.0.0451: some macros are in lower caseJan Edmund Lazo2018-06-12
| | | | | | | Problem: Some macros are in lower case. Solution: Make a few more macros upper case. Avoid lower case macros use an argument twice. https://github.com/vim/vim/commit/91acfffc1e6c0d8c2abfb186a0e79a5bf19c3f3f
* vim-patch:8.0.0466: still macros that should be all-caps (#8510)Jan Edmund Lazo2018-06-10
| | | | | Problem: There are still a few macros that should be all-caps. Solution: Make a few more macros all-caps. https://github.com/vim/vim/commit/8820b48654b62472821d9b155fe03ab7ac13a05c
* syntax: Fix PVS/V560: condition was already checkedZyX2018-04-22
|
* *: Fix clint errorsZyX2018-04-22
|
* syntax: Fix PVS/V560: condition was checked in previous if(), breakingZyX2018-04-22
|
* syntax: Fix PVS/V547: condition was checkedZyX2018-04-22
| | | | | In surrounding if() `off` was checked for being non-zero and in previous if() it was checked for being positive.
* syntax: Silence PVS/V560: condition is always true at that pointZyX2018-04-22
|
* syntax: Silence PVS/V522: retval is always non-NULL on this roundZyX2018-04-22
|
* syntax: Fix PVS/V560: condition checked in previous if()ZyX2018-04-22
|
* msg: do not scroll entire screen (#8088)Björn Linse2018-03-31
|
* refactor/rename: path_is_absolute()Justin M. Keyes2018-03-24
|
* build/MSVC: fix "C4005: RGB: macro redefinition"Justin M. Keyes2018-03-18
|
* vim-patch:8.0.0513: fix getting name of cleared highlight group (#8103)KunMing Xie2018-03-08
| | | | | | | Problem: Getting name of cleared highlight group is wrong. (Matt Wozniski) Solution: Only skip over cleared names for completion. (closes vim/vim#1592) Also fix that a cleared group causes duplicate completions. https://github.com/vim/vim/commit/c96272e30e2b81e5e0c8418f09d9db4e2fcd5d73
* vim-patch:8.0.0220: highlight completion misses some values #8013ckelsel2018-03-04
| | | | | | | | Problem: Completion for :match does not show "none" and other missing highlight names. Solution: Skip over cleared entries before checking the index to be at the end. https://github.com/vim/vim/commit/15eedf1d621d980cb40f50cc6a78a09ab94388c7
* vim-patch:8.0.1561: crash with rust syntax highligting (#8095)James McCoy2018-03-03
| | | | | | | | Problem: Crash with rust syntax highligting. (Edd Barrett) Solution: Avoid going past the end of an empty line. https://github.com/vim/vim/commit/069dafc1ded60d9ee0fee4bcecce78ac8a235d87 Closes #6248
* vim-patch:8.0.0214 (#8010)KunMing Xie2018-02-19
| | | | | | | | | vim-patch:8.0.0214: leaking memory when syntax cluster id is unknown Problem: Leaking memory when syntax cluster id is unknown. (Coverity) Solution: Free the memory. https://github.com/vim/vim/commit/d7a96151e0c86e8d4f9162c919cf3ff400a893b6
* ui/tui: highlighting refactorBjörn Linse2018-02-11
| | | | | | | | Make HlAttr contain highlighting state for both color modes (cterm and rgb). This allows us to implement termguicolors completely in the TUI. Simplify some logic duplicated between ui.c and screen.c. Also avoid some superfluous highlighting reset events.
* vim-patch:8.0.0672: synconcealed() changes too often #7887nate2018-02-01
| | | | | | | | Problem: Third item of synconcealed() changes too often. (Dominique Pelle) Solution: Reset the sequence number at the start of each line. https://github.com/vim/vim/commit/cc0750dc6e878394ab0fd922b7ea4280918ae406 closes #7589
* Merge #7424 'vim-patch: 8.0.0198, 8.0.0200, 8.0.0201, 8.0.0202, 8.0.0204'Justin M. Keyes2018-01-18
|\
| * 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