| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: [security] use-after-free in qf_free_items
Solution: only access qfpnext, if it hasn't been freed
Coverity discovered a possible use-after-free in qf_free_items. When
freeing the qfline items, we may access freed memory, when qfp ==
qfpnext.
So only access qfpnext, when it hasn't been freed.
https://github.com/vim/vim/commit/567cae2630a51efddc07eacff3b38a295e1f5671
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
|
|
|
|
| |
This requires removing the "Inner expression should be aligned" rule
from clint as it prevents essentially any formatting regarding ternary
operators.
|
|
|
|
|
|
|
|
|
| |
Problem: heap-use-after-free in is_qf_win()
Solution: Check buffer is valid before accessing it
https://github.com/vim/vim/commit/fc68299d436cf87453e432daa77b6d545df4d7ed
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
|
|
|
|
|
| |
We already have an extensive suite of static analysis tools we use,
which causes a fair bit of redundancy as we get duplicate warnings. PVS
is also prone to give false warnings which creates a lot of work to
identify and disable.
|
| |
|
|
|
|
|
|
|
| |
When the contents of a quickfix buffer are replaced, there is a chance
that deletion of the previous lines fails. This ensures that we don't
get stuck in an infinite loop of retrying.
Fix #25402
|
|
|
|
|
|
| |
long is 32 bits on windows, while it is 64 bits on other architectures.
This makes the type suboptimal for a codebase meant to be
cross-platform. Replace it with more appropriate integer types.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: cannot use buffer-number for errorformat
Solution: add support for parsing a buffer number using '%b' in
'errorformat'
closes: vim/vim#13419
https://github.com/vim/vim/commit/b731800522af00fd348814d33a065b92e698afc3
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
| |
Uncrustify is the source of truth where possible.
Remove any redundant checks from clint.py.
|
| |
|
|
|
|
|
|
| |
long is 32 bits on windows, while it is 64 bits on other architectures.
This makes the type suboptimal for a codebase meant to be
cross-platform. Replace it with more appropriate integer types.
|
|
|
|
|
|
| |
- Move vimoption_T to option.h
- option_defs.h is for option-related types
- option_vars.h corresponds to Vim's option.h
- option_defs.h and option_vars.h don't include each other
|
| |
|
| |
|
|
|
|
|
| |
long is 32-bits even on 64-bit windows which makes the type suboptimal
for a codebase meant to be cross-platform.
|
|
|
|
|
| |
problem: there are too many different functions in message.c
solution: fold some of the functions into themselves
|
|
|
|
|
| |
problem: there are too many different functions in message.c
solution: fold some of the functions into themselves
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of the messy things when changing a non-current buffer is
not about the buffer, it is about windows. In particular, it is about
`curwin`.
When editing a non-current buffer which is displayed in some other
window in the current tabpage, one such window will be "borrowed" as the
curwin. But this means if two or more non-current windows displayed the buffers,
one of them will be treated differenty. this is not desirable.
In particular, with nvim_buf_set_text, cursor _column_ position was only
corrected for one single window. Two new tests are added: the test
with just one non-current window passes, but the one with two didn't.
Two corresponding such tests were also added for nvim_buf_set_lines.
This already worked correctly on master, but make sure this is
well-tested for future refactors.
Also, nvim_create_buf no longer invokes autocmds just because you happened
to use `scratch=true`. No option value was changed, therefore OptionSet
must not be fired.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ml_get_buf() takes a third parameters to indicate whether the
caller wants to mutate the memline data in place. However
the vast majority of the call sites is using this function
just to specify a buffer but without any mutation. This makes
it harder to grep for the places which actually perform mutation.
Solution: Remove the bool param from ml_get_buf(). it now works
like ml_get() except for a non-current buffer. Add a new
ml_get_buf_mut() function for the mutating use-case, which can
be grepped along with the other ml_replace() etc functions which
can modify the memline.
|
|
|
|
|
|
|
|
|
|
| |
Problem: cannot store custom data in quickfix list
Solution: add `user_data` field for the quickfix list
closes: vim/vim#11818
https://github.com/vim/vim/commit/ca6ac99077d2e6d020a34267aa5e0fbc4d23dc38
Co-authored-by: Tom Praschan <13141438+tom-anders@users.noreply.github.com>
|
|
|
|
| |
followup to #24109
fix #16150
|
|
|
|
|
|
|
|
|
| |
Problem: Quickfix text field is truncated.
Solution: Fix output of text field after pattern field in quickfix buffer.
(Shane Harper, closes vim/vim#12498)
https://github.com/vim/vim/commit/5bf042810b19a627eda2f170624a0cfd7b4f6ed6
Co-authored-by: Shane Harper <shane@shaneharper.net>
|
|
|
|
|
|
|
|
| |
Removes the `getoption_T` struct and also introduces the `OptVal` struct
to unify the methods of getting/setting different option value types.
This is the first of many PRs to reduce code duplication in the Vim
option code as well as to make options easier to maintain. It also
increases the flexibility and extensibility of options. Which opens the
door for things like Array and Dictionary options.
|
|
|
|
|
|
|
|
| |
Problem: Using uninitialized memory with fuzzy matching.
Solution: Initialize the arrays used to store match positions.
https://github.com/vim/vim/commit/caf642c25de526229264cab9425e7c9979f3509b
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
| |
Problem: Handling new value of an option has a long "else if" chain.
Solution: Use a function pointer. (Yegappan Lakshmanan, closes vim/vim#12015)
https://github.com/vim/vim/commit/af93691b53f38784efce0b93fe7644c44a7e382e
|
|
|
|
| |
Notable changes: replace all infinite loops to `while(true)` and remove
`int` from `unsigned int`.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: no line break allowed in a for loop.
Solution: Skip line breaks in for command.
https://github.com/vim/vim/commit/b7a78f7a6713f07d2fcad0b27dea22925c7b1cdf
Omit *_break_count and skip_for_lines(): Vim9 script only.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: leaking memory when using continuation line.
Solution: Keep a pointer to the continuation line in evalarg_T. Centralize
checking for a next command.
https://github.com/vim/vim/commit/b171fb179053fa631fec74911b5fb9374cb6a8a1
Omit eval_next_line(): Vim9 script only.
vim-patch:8.2.1050: missing change in struct
Problem: Missing change in struct.
Solution: Add missing change.
https://github.com/vim/vim/commit/65a8ed37f7bc61fbe5c612a7b0eb0dfc16ad3e11
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Vim9: script cannot use line continuation like in a :def function.
Solution: Pass the getline function pointer to the eval() functions. Use it
for addition and multiplication operators.
https://github.com/vim/vim/commit/5409f5d8c95007216ae1190565a7a8ee9ebd7100
Omit source_nextline() and eval_next_non_blank(): Vim9 script only.
N/A patches for version.c:
vim-patch:8.2.1048: build failure without the eval feature
Problem: Build failure without the eval feature.
Solution: Add dummy typedef.
https://github.com/vim/vim/commit/9d40c63c7dc8c3eb3886c58dcd334bc7f37eceba
vim-patch:8.2.1052: build failure with older compilers
Problem: Build failure with older compilers.
Solution: Move declaration to start of block.
https://github.com/vim/vim/commit/7acde51832f383f9a6d2e740cd0420b433ea841a
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vim-patch:8.2.0695: Vim9: cannot define a function inside a function
Problem: Vim9: cannot define a function inside a function.
Solution: Initial support for :def inside :def.
https://github.com/vim/vim/commit/04b12697838b232b8b17c553ccc74cf1f1bdb81c
vim-patch:8.2.0725: Vim9: cannot call a function declared later in Vim9 script
Problem: Vim9: cannot call a function declared later in Vim9 script.
Solution: Make two passes through the script file.
https://github.com/vim/vim/commit/09689a02840be40fa7bb10b1921fb5bc5b2908f1
vim-patch:8.2.0734: Vim9: leaking memory when using :finish
Problem: Vim9: leaking memory when using :finish.
Solution: Do not check for next line in third pass.
https://github.com/vim/vim/commit/04816717dfea6e2469ff4c9d40f68b59aaf03724
vim-patch:8.2.0753: Vim9: expressions are evaluated in the discovery phase
Problem: Vim9: expressions are evaluated in the discovery phase.
Solution: Bail out if an expression is not a constant. Require a type for
declared constants.
https://github.com/vim/vim/commit/32e351179eacfc84f64cd5029e221582d400bb38
vim-patch:8.2.0818: Vim9: using a discovery phase doesn't work well
Problem: Vim9: using a discovery phase doesn't work well.
Solution: Remove the discovery phase, instead compile a function only when
it is used. Add :defcompile to compile def functions earlier.
https://github.com/vim/vim/commit/822ba24743af9ee1b5e7f656a7a61a38f3638bca
vim-patch:8.2.0819: compiler warning for unused variable
Problem: Compiler warning for unused variable.
Solution: Remove the variable.
https://github.com/vim/vim/commit/f40e51a880a95f94dbbbecc9476559506c2cc345
vim-patch:8.2.0822: Vim9: code left over from discovery phase
Problem: Vim9: code left over from discovery phase.
Solution: Remove the dead code.
https://github.com/vim/vim/commit/2eec37926db6d31beb36f162ac00357a30c093c8
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
|
| |
|
| |
|
|
|
|
| |
message.c functions now take const char * as a format. Error message
definitions can be made const.
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Get E967 when using text property in quickfix window. (Sergey
Vlasov)
Solution: Do not add an extra NUL and compute the text length correctly.
(closes vim/vim#11513)
https://github.com/vim/vim/commit/2f7bfe66a1373051792f2ecaeefb66049825221d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
| |
Problem: Quickfix commands may keep memory allocated.
Solution: Free memory when it's a bit much. (Yegappan Lakshmanan,
closes vim/vim#11379)
https://github.com/vim/vim/commit/d8cd6f7427bc89aa38f42cc44f58bf5fb5f0f972
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
| |
Problem: Alloc/free of buffer for each quickfix entry is inefficient.
Solution: Use a shared grow array. (Yegappan Lakshmanan, closes vim/vim#11365)
https://github.com/vim/vim/commit/975a665d4811649a51e2c6a97a6ce096290d87ae
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Quickfix listing does not handle very long messages.
Solution: Use a growarray instead of a fixed size buffer. (Yegappan
Lakshmanan, closes vim/vim#11357)
https://github.com/vim/vim/commit/f8412c9d7cc487dacf47a217ae947da68a525c53
Override Test_very_long_error_line() with a rewrite that doesn't use
deferred delete and string interpolation.
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
| |
|
|
|
|
|
|
|
|
| |
(#21921)" (#21979)
This reverts commit 0371d0f7afa5e01dd2ac8bbd3abcf0f7454872b3.
> 'bufhidden' option exists. I don't think we should assume autoclosing
windows are fine just because 'hidden' is set.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
The "force" flag of win_close() complicates the code and adds edge cases
where it is not clear what the correct behavior should be.
The "free_buf" flag of win_close() is passed on to float windows when
closing the last window of a tabpage, which doesn't make much sense.
Solution:
Remove the "force" flag and always close float windows as if :close! is
used when closing the last window of a tabpage, and set the "free_buf"
flag for a float window based on whether its buffer can be freed.
As 'hidden' is on by default, this change shouldn't affect many people.
|
|
|
|
|
| |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
| |
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes vim/vim#11833)
https://github.com/vim/vim/commit/f97a295ccaa9803367f3714cdefce4e2283c771d
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|