| Commit message (Collapse) | Author | Age |
... | |
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Compiler warns for uninitialized variable. (Tony Mechelynck)
Solution: When skipping set "id" to -1.
https://github.com/vim/vim/commit/eb46f8fa14a586779f55b1c7f1648f559618322e
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| | |
do_highlight() should not redraw if a validation error occurred.
closes #7489
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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'
|
| | |
|
| | |
|
| |
| |
| |
| | |
Also fixes some errors found.
|
| | |
|
| |
| |
| |
| | |
Big function in expressions.c may be refactored, if I ever catch the idea how to
split it right.
|
| |
| |
| | |
Also adjusts some names.
|
| |
| |
| |
| |
| | |
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.
|
|/ |
|
|\ |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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 all properties
- test failure modes
|
|\ \ \
| |_|/
|/| | |
|
| | | |
|
| | | |
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
...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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
|
| |
Problem: No command line completion for ":syntax spell" and ":syntax sync".
Solution: Implement the completion. (Dominique Pelle)
https://github.com/vim/vim/commit/2d02839050a2557bf36dab37ccd9f92168a757d1
|
|
|
|
|
| |
Converts some documentation to doxygen format + minor styling
improvements.
|
|
|
|
|
|
| |
- :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
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Just another pointer hack used with hash tables.
|
| |
|
| |
|
|
|
|
| |
Closes #6508
|
|
|
|
| |
Bug was introduced 3 years earlier, in 13848aa: NULL keyword_copy was
incorrectly treated as an indicator of OOM.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Closes #2583
|
|
|
| |
Also renames functions added in master and renamed here.
|
| |
|
| |
|
|
|
|
| |
Function was renamed and changed to return `const char *`.
|
|
|
|
| |
Also fixes buffer reusage in setmatches() and complete().
|
| |
|
|
|
|
|
|
|
|
| |
Main points:
- Replace `char_u` with `char` in some cases.
- Remove `str[len] = NUL` hack in some cases when `str` may be considered
`const`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|