| Commit message (Collapse) | Author | Age |
|
|
|
| |
"void" cast unused return value of find_last_paren().
|
|
|
|
|
|
| |
Problem: Using old style comments in new file.
Solution: Convert to // comments in new file. (Yegappan Lakshmanan)
https://github.com/vim/vim/commit/9c46efd7dc57c1a8eae5137d05c7e67c4f82c3d7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Pragmas are indented all the way to the left.
Solution: Add an option to indent progmas like normal code. (Max Rumpf,
closes vim/vim#5468)
https://github.com/vim/vim/commit/d881b516da0184052d2f9d33c3f72c5c014316bd
N/A patches for version.c:
vim-patch:8.1.2030: tests fail when build with normal features and terminal
Problem: Tests fail when build with normal features and terminal.
(Dominique Pelle)
Solution: Disable tests that won't work. (closes vim/vim#4932)
https://github.com/vim/vim/commit/997d42427eaab889058eb047e08d55de9e4a968a
vim-patch:8.1.2063: some tests fail when +balloon_eval_term is missing
Problem: Some tests fail when +balloon_eval_term is missing but
_balloon_eval is present. (Dominique Pelle)
Solution: Check the right feature in the test. (closes vim/vim#4962)
https://github.com/vim/vim/commit/1e82a784ace6d2c4dce594dd6156bcb0028bba9e
vim-patch:8.2.1938: wiping out a terminal buffer makes some tests fail
Problem: Wiping out a terminal buffer makes some tests fail.
Solution: Do not wipe out the terminal buffer unless wanted.
https://github.com/vim/vim/commit/a46765a79745ff27b4a44659fb8389519c961977
|
| |
|
|
|
|
|
|
| |
Problem: Illegal memory access when using 'cindent'.
Solution: Check for NUL byte. (Dominique Pelle, closes vim/vim#5470)
https://github.com/vim/vim/commit/02ad46394e8f887b60fda994f8a5da2ac1937b23
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
During a refactor long ago, we changed the `getdigits_*` familiy of
functions to abort on overflow. But this is often wrong, because many
of these codepaths are handling user input.
Solution:
Decide at each call-site whether to use "strict" mode.
fix #5555
|
| |
|
| |
|
|
|
|
|
|
| |
Problem: Indenting raw C++ strings is wrong.
Solution: Add special handling of raw strings. (Christian Brabandt)
https://github.com/vim/vim/commit/dde81312b031211752d1fcb8539d79f90f324a2e
|
|
|
|
|
|
|
| |
vim-patch:8.0.0431: 'cinoptions' cannot set indent for extern block
Problem: 'cinoptions' cannot set indent for extern block.
Solution: Add the "E" flag in 'cinoptions'. (Hirohito Higashi)
https://github.com/vim/vim/commit/7720ba8599162fbbb8f7fc034f674a2ccd3ca7f1
|
|
|
|
|
|
|
|
| |
Problem: The effect of adding "vim/vim#" to 'cinoptions' is not always removed.
(David Briscoe)
Solution: Reset b_ind_hash_comment. (Christian Brabandt, closes vim/vim#1475)
https://github.com/vim/vim/commit/6b64394f346594404cffb9591d71ac693040679f
|
|
|
|
|
|
|
|
|
| |
Problem: When a C preprocessor statement has two line continuations the
following line does not have the right indent. (Ken Takata)
Solution: Add the indent of the previous continuation line. (Hirohito
Higashi)
https://github.com/vim/vim/commit/c6aa475a27e3ed1645446b014c32ebf68d005d49
|
|
|
|
|
|
|
|
| |
Problem: C indenting does not support nested namespaces that C++ 17 has.
Solution: Add check that passes double colon inside a name. (Pauli, closes
vim/vim#1214)
https://github.com/vim/vim/commit/ca8b8d6956dd881de6446fc32c38e817a364a6cc
|
|
|
|
|
|
|
| |
Problem: Invalid memory access when formatting. (Dominique Pelle)
Solution: Make sure cursor line and column are associated.
https://github.com/vim/vim/commit/80c3fd7c559c7d329d57afe10db9bfb0adf10e46
|
| |
|
| |
|
|
|
|
| |
Also fixed an error in path_fnamecmp().
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Originally there were 128 new errors, so I thought this is a good idea to fix
all of them. Of course, this commit also fixes many suppressed errors.
|
|
|
|
|
|
|
| |
Problem: Wrong indenting for C++ constructor.
Solution: Recognize ::. (Anhong)
https://github.com/vim/vim/commit/e01f4f86cef7bed3cb99b26f9f57d86f6eb5fe1a
|
|
|
|
|
|
|
|
| |
Problem: C indenting is wrong below a "case (foo):" because it is
recognized as a C++ base class construct. Issue #38.
Solution: Check for the case keyword.
https://github.com/vim/vim/commit/d1b15dec4d00d7ed5e92ff4e0fb7fc2e0818e479
|
|
|
|
|
|
|
|
| |
Problem: Indentation of array initializer is wrong.
Solution: Avoid that calling find_start_rawstring() changes the position
returned by find_start_comment(), add a test. (Hirohito Higashi)
https://github.com/vim/vim/commit/089af18d1fd0961ff504ee72db0156bbfe509cdf
|
| |
|
| |
|
|
|
|
|
|
|
| |
Problem: C indent does not support C11 raw strings. (Mark Lodato)
Solution: Do not change indent inside the raw string.
https://github.com/vim/vim/commit/f7bb86dc593913d055e4cce16cec43f6271adda3
|
| |
|
|
|
|
|
|
|
| |
Problem: For indenting, finding the C++ baseclass can be slow.
Solution: Cache the result. (Hirohito Higashi)
https://github.com/vim/vim/commit/4032cfdf17c1c744d0f87219924870378b86a1c4
|
|
|
|
|
|
|
| |
Problem: Using 'cindent' for Javascript is less than perfect.
Solution: Improve indenting of continuation lines. (Hirohito Higashi)
https://github.com/vim/vim/commit/dcefba993456263100785f18d21d780cf531f2dc
|
| |
|
| |
|
|
|
|
|
|
| |
We already use wrappers for allocation, the new `xfree` function is the
equivalent for deallocation and provides a way to fully replace the malloc
implementation used by Neovim.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor summary:
- foldinfo_T.fi_lnum: int --> linenr_T
Reorder field for optimal packing.
- foldAddMarker(..., markerlen): int --> size_t
* foldstartmarkerlen: int --> size_t
- foldDelMarker(..., markerlen): int --> size_t
* foldendmarkerlen: int --> size_t
Helped-by: oni-link <knil.ino@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This hoists the initialization of `our_paren_pos` outside a conditional
so it can be safely referenced further down in this function.
Originally broken in:
https://code.google.com/p/vim/source/diff?spec=svndc8197342755fda6ca4d6619dac228406867a7ce&old=01583c79d5f4d3f29d4c33dd10dd29efd349cad0&r=dc8197342755fda6ca4d6619dac228406867a7ce&format=unidiff&path=%2Fsrc%2Fmisc1.c
This fixes CID #102151
https://scan8.coverity.com/reports.htm#v22612/p10672/fileInstanceId=3625174&defectInstanceId=1525719&mergedDefectId=102151
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem : getdigits() currently returns a long, but at most places,
return value is casted (unsafely) into an int. Making casts
safe would introduce a lot of fuss in the form of assertions
checking for limits.
Note : We cannot just change return type to int, because, at some
places, legitimate long values are used. For example, in
diff.c, for line numbers.
Solution : Introduce new functions:
- get_digits() : Gets an intmax_t from a string.
- get_int_digits() : Wrapper for ints.
- get_long_digits() : Wrapper for longs.
And replace getdigits() invocations by the appropiate
wrapper invocations.
|
|
|
|
|
|
|
|
| |
Problem: C indent is wrong below an if with wrapped condition followed by
curly braces. (Trevor Powell)
Solution: Make a copy of tryposBrace.
https://code.google.com/p/vim/source/detail?r=v7-4-395
|
|
|
|
|
|
|
| |
Problem: Several problems with Javascript indenting.
Solution: Improve Javascript indenting.
https://code.google.com/p/vim/source/detail?r=v7-4-355
|
|
|
|
|
|
|
|
|
| |
Problem: Using C indenting for Javascript does not work well for a {} block
inside parenthesis.
Solution: When looking for a matching paren ignore one that is before the
start of a {} block.
https://code.google.com/p/vim/source/detail?r=v7-4-350
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A similar macro is defined in the Linux kernel [1].
To refactor the code I used a slightly modified Coccinelle script I found in
[2].
```diff
// Use the macro ARRAY_SIZE when possible
//
// Confidence: High
// Copyright: (C) Gilles Muller, Julia Lawall, EMN, DIKU. GPLv2.
// URL: http://www.emn.fr/x-info/coccinelle/rules/array.html
// Options: -I ... -all_includes can give more complete results
@@
type T;
T[] E;
@@
- (sizeof(E)/sizeof(*E))
+ ARRAY_SIZE(E)
@@
type T;
T[] E;
@@
- (sizeof(E)/sizeof(E[...]))
+ ARRAY_SIZE(E)
@@
type T;
T[] E;
@@
- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)
@n@
identifier AS,E;
@@
- #define AS(E) ARRAY_SIZE(E)
@@
expression E;
identifier n.AS;
@@
- AS(E)
+ ARRAY_SIZE(E)
```
`spatch --in-place --sp-file array_size.cocci -I src/ -I build/include/ -I build/src/nvim/auto/ src/nvim/*.c`
[1] http://lxr.free-electrons.com/source/include/linux/kernel.h#L54
[2] http://www.emn.fr/z-info/coccinelle/rules/#macros
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace code like this
```c
func() {
if (cond) {
...
...
...
}
return ret;
}
```
```c
for (...) {
if (cond) {
...
...
...
}
}
```
with
```c
func() {
if (!cond) {
return ret;
}
...
...
...
}
```
```c
for (...) {
if (!cond) {
continue;
}
...
...
...
}
```
|
| |
|
|
|
|
|
|
|
| |
Problem: When using "J1" in 'cinoptions' a line below a continuation line gets too much indent.
Solution: Fix parenthesis in condition.
https://code.google.com/p/vim/source/detail?r=v7-4-348
|
| |
|
| |
|
| |
|