aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
Commit message (Collapse)AuthorAge
...
* vim-patch:8.2.3914 (#16808)dundargoc2021-12-28
| | | | | | | | | * vim-patch:8.2.3914: various spelling mistakes in comments Problem: Various spelling mistakes in comments. Solution: Fix the mistakes. (Dominique Pellé, closes vim/vim#9416) https://github.com/vim/vim/commit/af4a61a85d6e8cacc35324f266934bc463a21673 Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* feat(autocmd): add Recording autocmdsThomas Vigouroux2021-12-18
| | | | | | | | | | | | | | feat(eval): add reg_recorded() This function is used the get the last recorded register. style(Recording): rename handler to match suggestions fix(RecordingLeave): send autocommand earlier This makes the autocommand fire just before setting reg_recorded to reg_recording, this way we clearly show that we are actually just before actually quitting the recording mode.
* refactor(misc1): move out high-level input functions to a new file: input.cBjörn Linse2021-12-10
| | | | | Possibly dialog code is messages.c could be moved here as well. misc1.c is now empty, so delete it.
* vim-patch:8.1.2104: the normal.c file is too big (#16389)Volodymyr Kot2021-12-06
| | | | | | Problem: The normal.c file is too big. Solution: Move do_pending_operator() to ops.c. (Yegappan Lakshmanan, closes vim/vim#4999). https://github.com/vim/vim/commit/792cf5e1bec04c6d6d70cfbb9ef24c798b469731
* Merge pull request #15840 from vimpostor/vim-8.2.3430Jan Edmund Lazo2021-11-30
|\ | | | | vim-patch:8.2.{3430,3434,3462,3463,3555,3609,3610}: ModeChanged autocmd
| * vim-patch:8.2.3609: internal error when ModeChanged is triggered recursivelyMagnus Groß2021-11-18
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Internal error when ModeChanged is triggered when v:event is already in use. Solution: Save and restore v:event if needed. https://github.com/vim/vim/commit/3075a45592fe76f2febb6321632a23e352efe949 In the vim codebase there is no occurrence of get_vim_var_dict(VV_EVENT) after the above patch, so in order to hold the same invariant in the neovim codebase we needed to replace more occurrences than the related vim patch.
* | vim-patch:8.2.3687: blockwise insert does not handle autoindent properlyChristian Clason2021-11-28
| | | | | | | | | | | | | | | | Problem: Blockwise insert does not handle autoindent properly when tab is inserted. Solution: Adjust text column for indent before computing column. (closes vim/vim#9229) https://github.com/vim/vim/commit/59f4f9505ae7ca2499904b94100db103e5ada5a6
* | vim-patch:8.2.3684: blockwise insert does not handle autoindent properlyChristian Clason2021-11-27
| | | | | | | | | | | | Problem: Blockwise insert does not handle autoindent properly. Solution: Adjust text column for indent. (closes vim/vim#9229) https://github.com/vim/vim/commit/e9b0b40b7978f683977922233b42dd439ef31920
* | vim-patch:8.2.3677: after a put the '] mark is on the last byte (#16442)Christian Clason2021-11-26
| | | | | | | | | | | | Problem: After a put the '] mark is on the last byte of a multi-byte character. Solution: Move it to the first byte. (closes vim/vim#9047) https://github.com/vim/vim/commit/4d07253a485819b3a9fd923d263e722ea2109c12
* | refactor: saner options for uncrustify (#16204)dundargoc2021-11-19
|/ | | | | | | | | | | | | | | | | | | | | | | | * sp_enum_after_assign = force * sp_brace_typedef = force * nl_do_brace = remove * sp_do_brace_open = force * sp_brace_close_while = force * sp_before_semi = remove * sp_before_semi_for = remove * sp_before_semi_for_empty = remove * sp_between_semi_for_empty = remove * sp_after_semi_for_empty = remove * sp_before_square = remove * sp_before_squares = remove * sp_inside_square = remove * sp_inside_fparens = remove * sp_inside_fparen = remove * sp_inside_tparen = remove * sp_after_tparen_close = remove * sp_return_paren = force * pos_bool = lead * sp_pp_concat = remove * sp_pp_stringify = remove * fixup: disable formatting for the INIT section
* refactor(multibyte): eliminate mb_char2len alias for utf_char2lenBjörn Linse2021-11-14
|
* refactor(multibyte): eliminate mb_ptr2len alias for utfc_ptr2lenBjörn Linse2021-11-14
|
* refactor(multibyte): eliminate mb_char2cells alias for utf_char2cellsBjörn Linse2021-11-14
|
* vim-patch:8.1.0779: argument for message functions is inconsistentJames McCoy2021-11-01
| | | | | | Problem: Argument for message functions is inconsistent. Solution: Make first argument to msg() "char *". https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c
* vim-patch:8.1.0743: giving error messages is not flexibleJames McCoy2021-11-01
| | | | | | | | | Problem: Giving error messages is not flexible. Solution: Add semsg(). Change argument from "char_u *" to "char *", also for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes vim/vim#3302) Also make emsg() accept a "char *" argument. Get rid of an enormous number of type casts. https://github.com/vim/vim/commit/f9e3e09fdc93be9f0d47afbc6c7df1188c2a5a0d
* vim-patch:8.1.0306: plural messages are not translated properlyJames McCoy2021-11-01
| | | | | | Problem: Plural messages are not translated properly. Solution: Add more usage of NGETTEXT(). (Sergey Alyoshin) https://github.com/vim/vim/commit/da6e8919e75fa8f961d1b805e877c8a92e76dafb
* refactor: saner options for uncrustify #16196dundargoc2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor: general good option changes sp_deref = remove sp_not = remove sp_inv = remove sp_inside_paren_cast = remove mod_remove_duplicate_include = true sp_after_semi = add sp_after_semi_for = force sp_sizeof_paren = remove nl_return_expr = remove nl_else_brace = remove nl_else_if = remove * refactor: mod_remove_extra_semicolon = true * refactor: nl_max = 3 * refactor: sp_bool = force * refactor: sp_compare = force * refactor: sp_inside_paren = remove * refactor: sp_paren_paren = remove * refactor: sp_inside_sparen = remove * refactor: sp_before_sparen = force * refactor: sp_sign = remove * refactor: sp_addr = remove * refactor: sp_member = remove * refactor: nl_struct_brace = remove * refactor: nl_before_if_closing_paren = remove * refactor: nl_fdef_brace = force * refactor: sp_paren_comma = force * refactor: mod_full_brace_do = add
* vim-patch:8.1.2392: using old C style commentsDundar Göc2021-10-21
| | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/6e0ce171e19d0118ecd7c2b16e2a1bd50aa76013
* refactor: remove space after starDundar Göc2021-10-19
|
* refactor: make commas trail in enumsDundar Göc2021-10-19
|
* Merge pull request #15930 from dundargoc/vim-patch/old-style-c-commentsJan Edmund Lazo2021-10-17
|\ | | | | vim-patch:8.1.2396,8.1.2395,8.1.2394,8.1.2392,8.1.2368,8.1.2388,8.1.2379
| * vim-patch:8.1.2392: using old C style commentsDundar Göc2021-10-06
| | | | | | | | | | | | Problem: Using old C style comments. Solution: Use // comments where appropriate. https://github.com/vim/vim/commit/6e0ce171e19d0118ecd7c2b16e2a1bd50aa76013
* | refactor: reduce number of unique char castsDundar Göc2021-10-13
| |
* | vim-patch:8.2.{210,424,436,...} #15976Jan Edmund Lazo2021-10-09
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vim-patch:8.2.1082: Coverity complains about ignoring dict_add() return value Problem: Coverity complains about ignoring dict_add() return value. Solution: Add (void). https://github.com/vim/vim/commit/91639195eff7b29213a0a3c279ac46e46ac76edd N/A patches for version.c: vim-patch:8.2.0210: Coverity complains about uninitialized field Problem: Coverity complains about uninitialized field. Solution: Initialize the field. https://github.com/vim/vim/commit/eed3571fe0f7d2ae779e5d36388cc4fe16c3516e vim-patch:8.2.0424: checking for wrong return value Problem: Checking for wrong return value. (Tom) Solution: Invert the check and fix the test. https://github.com/vim/vim/commit/97acfc781bdb7fa2838dc6e0e7f9952ea61bb2fd vim-patch:8.2.0436: no warnings for incorrect printf arguments Problem: No warnings for incorrect printf arguments. Solution: Fix attribute in declaration. Fix uncovered mistakes. (Dominique Pelle, closes vim/vim#5834) https://github.com/vim/vim/commit/db99f9f29a248b84742b6779c3343123f72065e7 vim-patch:8.2.0498: Coverity complains about uninitialized field Problem: Coverity complains about uninitialized field. Solution: Initialize the whole typval_T. https://github.com/vim/vim/commit/4227c789ffe667b74affab38a1b8bea27cd69b36 vim-patch:8.2.0668: compiler warning for int/size_t usage Problem: Compiler warning for int/size_t usage. Solution: Change "int" to "size_t". (Mike Williams) https://github.com/vim/vim/commit/7f6f56f43c48f0b7288a4edd12b59fa7335f01d3 vim-patch:8.2.1034: compiler warning for uninitialized variables Problem: Compiler warning for uninitialized variables. Solution: Add initializations. (John Marriott) https://github.com/vim/vim/commit/38041da1c263f5840f21e15484d7ccb30999ed62 vim-patch:8.2.1117: Coverity warns for unsing unitialized field Problem: Coverity warns for unsing unitialized field. Solution: Initialize v_lock. https://github.com/vim/vim/commit/a9a8e5f0dc22aaa9e53578b5b2d7569279e6cb94 vim-patch:8.2.1148: warning for using int instead of size_t Problem: Warning for using int instead of size_t. Solution: Change "len" argument to size_t. (Mike Williams) https://github.com/vim/vim/commit/cbb6bdcd8967edc8ad123746d27ec30ccc7c1718 vim-patch:8.2.1251: Vim9: warning for pointer usage, test failure undetected Problem: Vim9: warning for pointer usage, test failure undetected. Solution: Fix pointer indirection. Give error when executing function failed for any reason. Fix instruction names. https://github.com/vim/vim/commit/682d0a15462f3d4f9404e98a56b340ae131cbb09 printable_func_name() is applicable but the vim9 changes are N/A. Compilers can detect misuse of static functions. vim-patch:8.2.1275: Vim9: compiler warning for buffer size Problem: Vim9: compiler warning for buffer size. Solution: Change the offset from 10 to 15. (Dominique Pellé, closes vim/vim#6518) https://github.com/vim/vim/commit/5a67c37a554daa7627bdf0c8e7ddd5f1b597f978 vim-patch:8.2.1443: Vim9: crash when interrupting a nested :def function Problem: Vim9: crash when interrupting a nested :def function. Solution: Push a dummy return value onto the stack. (closes vim/vim#6701) https://github.com/vim/vim/commit/cdd70f09a5340c3d7ae873f1aaaf9847f27410cc vim-patch:8.2.1818: SE Linux: deprecation warning for security_context_t Problem: SE Linux: deprecation warning for security_context_t. Solution: Use "char *" instead. (James McCoy, closes vim/vim#7093) https://github.com/vim/vim/commit/8956023920bb1b6f9c381739e59b9ddab4bf7798 SELINUX support was removed in commit 1de77bbcec8ea4e50475e9b33986246e47614b84 vim-patch:8.2.2004: compiler warning for uninitialized variable Problem: Compiler warning for uninitialized variable. Solution: Initialize "ufunc". (John Marriott) https://github.com/vim/vim/commit/b3a01946b30f33e7be0358b3ff2736b94973a659 vim-patch:8.2.2051: Vim9: crash when aborting a user function call Problem: Vim9: crash when aborting a user function call. Solution: Do not use the return value when aboring. (closes vim/vim#7372) https://github.com/vim/vim/commit/34c54eb6cbda5dbc14376c8b1c62ad11d4852793 vim-patch:8.2.2270: warning for size_t to int conversion Problem: Warning for size_t to int conversion. (Randall W. Morris) Solution: Add a type cast. https://github.com/vim/vim/commit/38a434f7ba89ab2602019476219780e07fd8251f vim-patch:8.2.2333: Vim9: warning for uninitialized variable Problem: Vim9: warning for uninitialized variable. (Tony Mechelynck) Solution: Initialize "res". https://github.com/vim/vim/commit/cb6cbf29e97b7abdeb1e6cbdc5e735f5b55e97a1 vim-patch:8.2.2460: Coverity warns for unused value Problem: Coverity warns for unused value. Solution: Do not reset the return value to OK. https://github.com/vim/vim/commit/fc1dafa91cbf7876d711e8e36171eeec78eae13b vim-patch:8.2.2461: Coverity warns for unchecked return value Problem: Coverity warns for unchecked return value. Solution: Add "(void)" to avoid the warning. https://github.com/vim/vim/commit/fef8064b54ad0b1a7ce2f9cf024526627e6bdf57 vim-patch:8.2.2557: compiler warning for shadowd variable Problem: Compiler warning for shadowd variable. Solution: Declare "p" only once. https://github.com/vim/vim/commit/087b5ff35d219f4f48a3d4854783799d0f6a1732 vim-patch:8.2.2730: Coverity complains about not restoring character Problem: Coverity complains about not restoring character. Solution: Also restore the character in case of an error. https://github.com/vim/vim/commit/c9605f0595173bca0f158f2782de950ac6bed147 vim-patch:8.2.2795: Coverity warns for not using return value Problem: Coverity warns for not using return value. Solution: Check the return value of compiling the substitute expression. https://github.com/vim/vim/commit/169502fb0beb7eb21f72d6c4590483c069353b53 vim-patch:8.2.2995: linker errors with dynamic Python 3.10 Problem: Linker errors with dynamic Python 3.10. Solution: Add a couple of library entries. (Zdenek Dohnal, closes vim/vim#8381, closes vim/vim#8356) https://github.com/vim/vim/commit/90478f35a8c78e2e10a4b4a8f135998dc04c91fa vim-patch:8.2.3000: Vim9: warning for uninitialized variable Problem: Vim9: warning for uninitialized variable. Solution: Add initialization. (John Marriott) https://github.com/vim/vim/commit/3b814af7e1e7ca18fe1c8c671b18e5e8c1f9e94c vim-patch:8.2.3014: Coverity warns for freeing static string Problem: Coverity warns for freeing static string. Solution: Do not assign static string to pointer. (Dominique Pellé, closes vim/vim#8397) https://github.com/vim/vim/commit/6e9695525e212466398a269a54bc4d53625673f0 vim-patch:8.2.3205: Coverity reports a null pointer dereference Problem: Coverity reports a null pointer dereference. Solution: Change the logic to avoid Coverity gets confused. https://github.com/vim/vim/commit/1b862c466ba4242857eec581f67982d265005ef4 vim-patch:8.2.3294: Lua: memory leak when adding dict item fails Problem: Lua: memory leak when adding dict item fails. Solution: Free the typval and the dict item. https://github.com/vim/vim/commit/1b6acf02b7e685ecb87ccba52c91835a7519073e vim-patch:8.2.3302: Coverity is not run from github Problem: Coverity is not run from github. Solution: Add a coverity script. (James McCoy, closes vim/vim#8714) https://github.com/vim/vim/commit/d57a6bd98c9a57b766eadcc3f10e9c4169c788aa vim-patch:8.2.3319: Coverity action on github does not work Problem: Coverity action on github does not work. Solution: Remove undefined $SRCDIR. (James McCoy, closes vim/vim#8739) https://github.com/vim/vim/commit/eed9616120f60ad17d5e133f505bba5c559aee89 * vim-patch:8.2.1085: Coverity complains about ignoring dict_add() return value Problem: Coverity complains about ignoring dict_add() return value. Solution: Add (void). https://github.com/vim/vim/commit/6d90c61c5a6437ff5058b6c5874ba71bff574e60
* vim-patch:7.4.725Sean Dewar2021-09-23
| | | | | | | | | | | Problem: ":call setreg('"', [])" reports an internal error. Solution: Make the register empty. (Yasuhiro Matsumoto) https://github.com/vim/vim/commit/659c94d483b2fdad949c14a42cee96f99a66394b Required for v8.2.1035. Note that setreg('"', []) didn't cause an internal error for us, but didn't clear the register properly either...
* vim-patch:8.2.0924: cannot save and restore a register properlySean Dewar2021-09-23
| | | | | | | | | | | Problem: Cannot save and restore a register properly. Solution: Add getreginfo() and make setreg() accept a dictionary. (Andy Massimino, closes vim/vim#3370) https://github.com/vim/vim/commit/bb861e293e0170455184079fa537278754b07911 Cherry-pick eval.txt changes for getreginfo() from: https://github.com/vim/vim/commit/6aa57295cfbe8f21c15f0671e45fd53cf990d404 https://github.com/vim/vim/commit/207f009326c8f878defde0e594d7d9ed9860106e
* refactor: convert TRUE/FALSE to true/false (#15660)dundargoc2021-09-18
|
* Merge pull request #15364 from seandewar/vim-8.2.3337Jan Edmund Lazo2021-09-17
|\ | | | | vim-patch:8.2.{3286,3289,3293,3298,3313,3321,3328,3330,3331,3337,3354,3355,3357,3360,3369,3375}
| * vim-patch:8.2.3369: auto formatting after "cw" leaves cursor in wrong spotSean Dewar2021-09-17
| | | | | | | | | | | | Problem: Auto formatting after "cw" leaves cursor in wrong spot. Solution: Do not auto-format after the delete. (closes vim/vim#8789) https://github.com/vim/vim/commit/6b36d2a16d7931bac82ef8b5654c68ac456b24bf
* | refactor(style): switch-case formatting, "uncrustify:indent-off" #15669dundargoc2021-09-17
|/ | | | | | * refactor: disable formatting for attribute in macro * fixup: disable/enable uncrustify with uncrustify:indent-off/on * fixup: stop indenting contents inside braces in case * fixup: remove case brace if no variable declaration
* fix: "redundant cast to the same type" #15662dundargoc2021-09-14
| | | Apply "redundant cast to the same type" fix from clangd.
* refactor: replace TRUE/FALSE with true/false #15647dundargoc2021-09-13
|
* vim-patch:8.1.1355: obvious mistakes are accepted as valid expressionsSean Dewar2021-09-11
| | | | | | | | | Problem: Obvious mistakes are accepted as valid expressions. Solution: Be more strict about parsing numbers. (Yasuhiro Matsumoto, closes vim/vim#3981) https://github.com/vim/vim/commit/16e9b85113e0b354ece1cb4f5fcc7866850f3685 Update vim_str2nr_spec.lua to add more tests that use strict = true.
* Merge #15626 vim-patch:8.1.{2281,2283},8.2.{2903,3391,3397}Justin M. Keyes2021-09-10
|\
| * vim-patch:8.1.2281: 'showbreak' cannot be set for one windowSean Dewar2021-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: 'showbreak' cannot be set for one window. Solution: Make 'showbreak' global-local. https://github.com/vim/vim/commit/ee85702c10495041791f728e977b86005c4496e8 Change in oneleft() is N/A as the relevant condition was removed (has_mbyte is always true for Nvim, so the condition was always false; see commit 73dc9e9). Use wp over curwin for curs_columns(). Required for v8.2.2903 (otherwise test fails as it'll leave the global option set). N/A patches for version.c: vim-patch:8.1.2283: missed on use of p_sbr Problem: Missed on use of p_sbr. Solution: Add missing p_sbr change. https://github.com/vim/vim/commit/91e22eb6e09ec384496fccde812072033fd9e616 Already ported in commit 43a874a.
* | refactor: format files with uncrustify #15607dundargoc2021-09-10
|/
* refactor: format files with uncrustifyDundar Göc2021-09-07
|
* fix(bufupdates): send correct updates for visual pasteThomas Vigouroux2021-08-25
| | | | | | One step further towards stable tree-sitter. Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
* refactor: replace TRUE/FALSE with true/false #15425dundargoc2021-08-22
|
* refactor(plines): move horizontal size functions to plines.cBjörn Linse2021-08-11
| | | | fix style.
* Merge pull request #12971 from vigoux/decurbufBjörn Linse2021-07-09
|\ | | | | Decrease reliance on curbuf in BUFEMPTY and `undo.c`
| * buffer: move BUFEMPTY to a functionThomas Vigouroux2021-07-06
| |
| * buffer: don't rely on curbuf in BUFEMPTYThomas Vigouroux2021-07-06
| |
* | chore: use codespell to spell check #15016dundargoc2021-07-07
|/
* vim-patch:8.2.3072: "zy" does not work well when "virtualedit' is "block"Jan Edmund Lazo2021-06-29
| | | | | | | | | | | | | | | | | Problem: The "zy" command does not work well when 'virtualedit' is set to "block". (Johann Höchtl) Solution: Make endspaces zero. (Christian Brabandt, closes vim/vim#8468, closes vim/vim#8448) https://github.com/vim/vim/commit/7d7bcc6ba01454c1cbb1dcbf5f11c3a4051535d6 N/A patches for version.c: vim-patch:8.2.3075: xxd always reports an old version string Problem: Xxd always reports an old version string. (Åsmund Ervik) Solution: Update the version string with the last known change date. (Jürgen Weigert, closes vim/vim#8475) https://github.com/vim/vim/commit/80b2ba3e9602e09ab523e78946fbb26da311b68b
* Merge pull request #14335 from chentau/extmark_delbytesBjörn Linse2021-06-29
|\ | | | | Extmarks: manually zero out `curbuf->deleted_bytes2` on substitute and join
| * Manually zero out deleted_bytes2 when substituting and joining lineschentau2021-06-29
| |
* | vim-patch:8.2.2971: cannot yank a block without trailing spacesJan Edmund Lazo2021-06-10
|/ | | | | | Problem: Cannot yank a block without trailing spaces. Solution: Add the "zy" command. (Christian Brabandt, closes vim/vim#8292) https://github.com/vim/vim/commit/544a38e44db0f25ec4fa7a2a4666cf28a2336f33
* vim-patch:8.2.2914: cannot paste a block without adding paddingJan Edmund Lazo2021-05-31
| | | | | | | | | Problem: Cannot paste a block without adding padding. Solution: Add "zp" and "zP" which paste without adding padding. (Christian Brabandt, closes vim/vim#8289) https://github.com/vim/vim/commit/2fa9384ca1b600b934bec81a72c5fb7ce757503a Cherry-pick Test_normal_z_error() from patch v8.2.0369.
* Apply patch from clasondisrupted2021-05-10
|