aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
Commit message (Collapse)AuthorAge
...
* | | 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
|
* syntax.c: Update color names. (#5733)Justin M. Keyes2016-12-08
| | | Closes #5178
* vim-patch:7.4.1691Shougo Matsushita2016-11-24
| | | | | | | | | Problem: When switching to a new buffer and an autocommand applies syntax highlighting an ml_get error may occur. Solution: Check "syn_buf" against the buffer in the window. (Alexander von Buddenbrock, closes vim/vim#676) https://github.com/vim/vim/commit/b681be175b6991cdc2b8ddd49b0e97e3fe2b201e
* 'inccommand': rename 'incsubstitute'Justin M. Keyes2016-11-08
| | | | | | | | | 'inccommand' allows us to expand the feature to other commands, such as: :cdo :cfdo :global Also rename "IncSubstitute" highlight group to "Substitute".
* 'inccommand': reworkJustin M. Keyes2016-11-08
| | | | | | | | | | | | | | | | | - Eliminate/isolate static/global variables - Remove special-case parameter from buflist_new() - Remove special-case ECMD_RESERVED_BUFNR - To determine when u_undo_and_forget() should be done, check b_changedtick instead of a heuristic. - use mb_string2cells() instead of strlen() to measure the :sub patterns - call ml_close() before buf_clear_file(). Avoids leaks caught by ASan. Original patch by: Robin Elrharbi-Fleury (Robinhola) Audrey Rayé (Adrey06) Philémon Hullot (DesbyP) Aymeric Collange (aym7) Clément Guyomard (Clement0)
* Incsubsitution featureKillTheMule2016-10-30
| | | | | | | | | | | | | | | | | Originally implemented by * Clement0 * DesbyP * aym7 * Adrey06 * Robinhola in #4811. Major reworkings and bug fixes by * bfredl Most tests suggested by ZyX-l, suggestions for improvements by oni-link.
* version: has("nvim-1.2.3")Justin M. Keyes2016-10-25
| | | | Helped-by: Daniel Hahler <git@thequod.de>
* vim-patch:7.4.1547 #5326Stéphane Campinas2016-09-16
| | | | | | | | Problem: Getting a cterm highlight attribute that is not set results in the string "-1". Solution: Return an empty string. (Taro Muraoka) https://github.com/vim/vim/commit/385111bd86e0b38667879c3e89506ca1ae98e1df
* syntax.c: Support bg/fg special color-names. #5319Kerem Cakirer2016-09-16
| | | | Refresh colors if changing Normal group
* refactor: eliminate misc2.cJustin M. Keyes2016-09-13
| | | | | | | | | | move `call_shell` to misc1.c Move some fns to state.c Move some fns to option.c Move some fns to memline.c Move `vim_chdir*` fns to file_search.c Move some fns to new module, bytes.c Move some fns to fileio.c
* highlight: Added QuickFixLine highlight groupTommy Allen2016-08-17
| | | | | | | | | | | | - Links to Search by default screen.c: Combine CursorLine with QuickFixLine - HLF_QFL takes priority over HLF_CUL docs: Updated to mention QuickFixLine runtime: Added QuickFixLine to nvimHLGroup tests: QuickFixLine highlight
* mouse.c: Adjust clicked column if chars are concealed (#5087)Tommy Allen2016-07-28
| | | | | syntax.c: Added syn_get_concealed_id() tests: Added tests for mouse clicks on concealed text.
* lintJames McCoy2016-07-08
|
* vim-patch:7.4.1552James McCoy2016-07-08
| | | | | | | Problem: ":colorscheme" does not use 'packpath'. Solution: Also use in "start" and "opt" directories in 'packpath'. https://github.com/vim/vim/commit/7f8989dd8a627af2185df381195351a913f3777f
* synIDattr(): return RRGGBB value for [fg|bg|sp]# #4851Rom Grk2016-06-18
| | | | | | | | | | add tests for synIDattr() with [fg|bg|sp]# add tests for synIDattr and various #RGB colors synIDattr: test for ui_rgb_attached() test: fix tests for synIDattr fg/bg/sp
* Make clint happy againJames McCoy2016-06-02
|
* vim-patch:7.4.1695James McCoy2016-06-02
| | | | | | | Problem: ":syn reset" clears the effect ":syn iskeyword". (James McCoy) Solution: Remove clearing the syntax keywords. https://github.com/vim/vim/commit/8bc189e81aa98ba4aebb03a9dc9527a210fce816
* vim-patch:7.4.1142James McCoy2016-06-02
| | | | | | | Problem: Cannot define keyword characters for a syntax file. Solution: Add the ":syn iskeyword" command. (Christian Brabandt) https://github.com/vim/vim/commit/b8060fe862f684b591f9ac679eac5b2594d6c5a0
* syntax: foo=NONE clears hi groupAdnoC2016-05-21
| | | | Closes #4767
* Merge #4633: support "special" highlight (undercurl)Justin M. Keyes2016-05-19
|\ | | | | | | | | Closes #2040 Closes #3370
| * LintingAdnoC2016-05-17
| |
| * syntax: Add support for the "special" color used for undercurlsAdnoC2016-05-17
| |
* | vim-patch: 7.4.1036Michael Ennen2016-05-17
|/ | | | | | | | Problem: Only terminals with up to 256 colors work properly. Solution: Use the 256 color behavior for all terminals with 256 or more colors. (Robert de Bath) https://github.com/vim/vim/commit/fa03fd6c4a9fe05274d62ddefd645cb5801d2023