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
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | refactor: remove longdundargoc2023-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | long is 32-bits even on 64-bit windows which makes the type suboptimal for a codebase meant to be cross-platform.
| * | | | vim-patch:partial:8.2.4950: text properties position wrong after shifting ↵zeertzjq2023-06-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | vim-patch:9.0.1597: cursor ends up below the window after a put (#23873)zeertzjq2023-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | vim-patch:9.0.1588: Incsearch not triggered when pasting clipboard register ↵zeertzjq2023-05-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#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>
| * | | | fix(redo): make redo of Lua mappings in op-pending mode work (#23566)zeertzjq2023-05-10
| | | | |
| * | | | vim-patch:9.0.1521: failing redo of command with control characterszeertzjq2023-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | vim-patch:9.0.1516: cannot use special keys in <Cmd> mappingzeertzjq2023-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | vim-patch:8.2.4890: inconsistent capitalization in error messageszeertzjq2023-05-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | vim-patch:9.0.0751: 'scrolloff' does not work well with 'smoothscroll'Luuk van Baal2023-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>