aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
Commit message (Collapse)AuthorAge
...
| * | | | | perf: reuse fast character size calculation algorithm from getvcol()VanaIgr2024-01-22
| | | | | |
| * | | | | fix(ops.c): remove duplicate u_save_cursor()zeertzjq2024-01-14
| | | | | |
| * | | | | Merge pull request #26734 from bfredl/splitaroobfredl2024-01-13
| |\ \ \ \ \ | | | | | | | | | | | | | | fix(buffer_updates): correct buffer updates when splitting empty line
| | * | | | | fix(buffer_updates): correct buffer updates when splitting empty linebfredl2024-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes #11591
| * | | | | | vim-patch:9.1.0021: i_CTRL-R- doesn't work for multibyte chars in Replace modezeertzjq2024-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: i_CTRL-R- doesn't work for multibyte chars in Replace mode, Coverity complains missing return value for u_save_cursor() Solution: Use mb_charlen() and del_chars() instead, handle failure mode for u_save_cursor() correctly (@zeertzjq) closes: vim/vim#13846 https://github.com/vim/vim/commit/424ec1f235a53131042aed94d30f6e2528e551d9
| * | | | | | vim-patch:9.1.0015: i_CTRL-R- no longer works in replace modezeertzjq2024-01-13
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: i_CTRL-R- no longer works in replace mode Solution: delete characters in replace mode before putting, add a test, add a bit warning into the documentation, that i_CTRL-R-P/O is not supported in Replace mode for now fixes: vim/vim#13792 closes: vim/vim#13816 https://github.com/vim/vim/commit/5d5cbb2b9ac526fb6fad2116e24a282affc45efe Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | | | | refactor(IWYU): fix headersdundargoc2024-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove `export` pramgas from defs headers as it causes IWYU to believe that the definitions from the defs headers comes from main header, which is not what we really want.
| * | | | | refactor: follow style guidedundargoc2023-12-30
| | | | | |
| * | | | | fix(clipboard): make getreg() accurate for clipboard registers (#26740)JD2023-12-28
| | | | | | | | | | | | | | | | | | | | | | | | Problem: getreg("*") / getreg("+") disagree with :registers. Solution: Avoid falling back to unnamed register if provider fails.
| * | | | | refactor: follow style guidedundargoc2023-12-24
| | | | | |
| * | | | | refactor: run IWYU on entire repodundargoc2023-12-21
| | | | | | | | | | | | | | | | | | | | | | | | Reference: https://github.com/neovim/neovim/issues/6371.
| * | | | | vim-patch:9.0.2178: reg_executing() wrong for :normal with range (#26660)zeertzjq2023-12-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: reg_executing() returns wrong result in :normal with range when 'showcmd' is set (after 8.2.4705). Solution: Reset "pending_end_reg_executing" when executing a register. closes: vim/vim#13707 https://github.com/vim/vim/commit/615202bd0ebc1d8e3532f24b9b7232c2fd86b181
| * | | | | refactor: use `bool` to represent boolean valuesdundargoc2023-12-19
| | | | | |
| * | | | | docs: add style rule regarding initializationdundargoc2023-12-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically, specify that each initialization should be done on a separate line.
| * | | | | refactor: format casting of negative number better (#26482)zeertzjq2023-12-09
| | |_|_|/ | |/| | |
* | | | | Merge remote-tracking branch 'upstream/master' into aucmd_textputpostaucmd_textputpostJosh Rahm2023-11-30
|\| | | |
| * | | | refactor: move some constants out of vim_defs.h (#26298)zeertzjq2023-11-29
| | | | |
| * | | | refactor: fix headers with IWYUdundargoc2023-11-28
| | | | |
| * | | | refactor: rename types.h to types_defs.hdundargoc2023-11-27
| | | | |
| * | | | build: enable IWYU on macdundargoc2023-11-27
| | | | |
| * | | | refactor: enable formatting for ternariesdundargoc2023-11-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires removing the "Inner expression should be aligned" rule from clint as it prevents essentially any formatting regarding ternary operators.
| * | | | refactor: follow style guidedundargoc2023-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | - reduce variable scope - prefer initialization over declaration and assignment
| * | | | refactor: follow style guidedundargoc2023-11-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - reduce variable scope - prefer initialization over declaration and assignment - use bool to represent boolean values
| * | | | fix(textformat): remove unnecessary changed_bytes() (#26027)zeertzjq2023-11-13
| | | | | | | | | | | | | | | This was removed from Vim in patch 8.1.0681.
| * | | | build: remove PVSdundargoc2023-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | refactor: remove redundant castsdundargoc2023-11-11
| | | | |
| * | | | refactor: change some xstrndup() and xstrnsave() to xmemdupz() (#25959)zeertzjq2023-11-10
| | | | | | | | | | | | | | | | | | | | When the given length is exactly the number of bytes to copy, xmemdupz() makes the intention clearer.
| * | | | refactor: the long goodbyedundargoc2023-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | vim-patch:9.0.2075: TextChangedI may not always trigger (#25808)zeertzjq2023-10-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | refactor(options): rename `empty_option` to `empty_string_option`Famiu Haque2023-10-17
| | | | |
| * | | | refactor: use xstpcpy() instead of strcat() (#25572)James2023-10-10
| | | | |
| * | | | refactor: the long goodbyedundargoc2023-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | refactor: the long goodbyedundargoc2023-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | refactor: reorganize option header files (#25437)zeertzjq2023-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
| * | | | refactor(message): smsg_attr -> smsgbfredl2023-09-29
| | | | |
| * | | | refactor: remove longdundargoc2023-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | long is 32-bits even on 64-bit windows which makes the type suboptimal for a codebase meant to be cross-platform.
| * | | | refactor(messages): fold msg_attr into msgbfredl2023-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | problem: there are too many different functions in message.c solution: fold some of the functions into themselves
| * | | | refactor(messages): fold msg_outtrans_attr into msg_outtransbfredl2023-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | problem: there are too many different functions in message.c solution: fold some of the functions into themselves
| * | | | vim-patch:9.0.1847: [security] potential oob write in do_addsub()zeertzjq2023-09-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | refactor(change): do API changes to buffer without curbuf switchbfredl2023-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | refactor(memline): distinguish mutating uses of ml_get_buf()bfredl2023-08-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |