aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/syntax.c
Commit message (Collapse)AuthorAge
...
| * 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
|
* 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.