| Commit message (Collapse) | Author | Age |
|\ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
This requires removing the "Inner expression should be aligned" rule
from clint as it prevents essentially any formatting regarding ternary
operators.
|
| |
| |
| |
| |
| | |
- reduce variable scope
- prefer initialization over declaration and assignment
|
| |
| |
| |
| |
| |
| | |
- reduce variable scope
- prefer initialization over declaration and assignment
- use bool to represent boolean values
|
| |
| |
| | |
This was removed from Vim in patch 8.1.0681.
|
| |
| |
| |
| |
| |
| |
| | |
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 given length is exactly the number of bytes to copy, xmemdupz()
makes the intention clearer.
|
| |
| |
| |
| |
| |
| | |
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: TextChangedI may not always trigger
Solution: trigger it in more cases: for insert/
append/change operations, and when
opening a new line,
fixes: vim/vim#13367
closes: vim/vim#13375
https://github.com/vim/vim/commit/4bca4897a12dfb91b3b27e3083fd5f370bd857d1
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: potential oob write in do_addsub()
Solution: don't overflow buf2, check size in for loop()
https://github.com/vim/vim/commit/889f6af37164775192e33b233a90e86fd3df0f57
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
long is 32-bits even on 64-bit windows which makes the type suboptimal
for a codebase meant to be cross-platform.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
text (#23930)
Problem: Text properties position wrong after shifting text.
Solution: Adjust the text properties when shifting a block of text.
(closes vim/vim#10418)
https://github.com/vim/vim/commit/4b93674159d60c985de906c30f45dbaf2b64056f
Co-authored-by: LemonBoy <thatlemon@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cursor ends up below the window after a put.
Solution: Mark w_crow and w_botline invalid when changing the cursor line.
(closes vim/vim#12465)
https://github.com/vim/vim/commit/8509014adda188ee8bdf6a2e123fbf15a91b29d2
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#23817)
Problem: Incsearch not triggered when pasting clipboard register on the
command line.
Solution: Also set "literally" when using a clipboard register. (Ken Takata,
closes vim/vim#12460)
https://github.com/vim/vim/commit/9cf6ab133227ac7e9169941752293bb7178d8e38
Co-authored-by: K.Takata <kentkt@csc.jp>
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Problem: Failing redo of command with control characters.
Solution: Use AppendToRedobuffLit() for colon commands. (closes vim/vim#12354)
https://github.com/vim/vim/commit/30b6d6104c3d541c41c868989c020b743e01af08
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Cannot use special keys in <Cmd> mapping.
Solution: Do allow for special keys in <Cmd> and <ScriptCmd> mappings.
(closes vim/vim#12326)
https://github.com/vim/vim/commit/3ab3a864814f903da8a158c01820e4fbe1013c08
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Inconsistent capitalization in error messages.
Solution: Make capitalization consistent. (Doug Kearns)
https://github.com/vim/vim/commit/cf030578b26460643dca4a40e7f2e3bc19c749aa
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: 'scrolloff' does not work well with 'smoothscroll'.
Solution: Make positioning the cursor a bit better. Rename functions.
https://github.com/vim/vim/commit/c9121f798f49fa71e814912cb186d89c164090c3
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: 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>
|
| | |
|
| |
| |
| |
| |
| | |
Previously, the fold information was incorrect because it wasn't
being updated during the blockwise insertion.
(Solution by zeertzjq)
|
| |
| |
| |
| | |
message.c functions now take const char * as a format. Error message
definitions can be made const.
|
| |
| |
| | |
Closes https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
drawscreen.c vs screen.c makes absolutely no sense.
The screen exists only to draw upon it, therefore helper functions
are distributed randomly between screen.c and the file that
does the redrawing. In addition screen.c does a lot of drawing on the
screen.
It made more sense for vim/vim as our grid.c is their screen.c
Not sure if we want to dump all the code for option chars into
optionstr.c, so keep these in a optionchar.c for now.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: CTRL-X on 2**64 subtracts two. (James McCoy)
Solution: Correct computation for large number. (closes vim/vim#12103)
https://github.com/vim/vim/commit/5fb78c3fa5c996c08a65431d698bd2c251eef5c7
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Problem: Illegal memory access when using virtual editing.
Solution: Make sure "startspaces" is not negative.
https://github.com/vim/vim/commit/c99cbf8f289bdda5d4a77d7ec415850a520330ba
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| |
| |
| | |
Work on https://github.com/neovim/neovim/issues/459
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#22505)
Problem: Accessing invalid memory with put in Visual block mode.
Solution: Adjust the cursor column if needed.
https://github.com/vim/vim/commit/1c73b65229c25e3c1fd8824ba958f7cc4d604f9c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
| | |
|
| |
| |
| |
| |
| | |
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
|