aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
Commit message (Collapse)AuthorAge
...
* | Merge pull request #17363 from zeertzjq/dirchangedprezeertzjq2022-02-17
|\ \ | | | | | | feat(events): add DirChangedPre
| * | feat(events): add DirChangedPrezeertzjq2022-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Nvim, like DirChanged, this also triggers when switching windows. This marks Vim patch 8.2.4335 as ported. vim-patch:8.2.4335: no autocommand event triggered before changing directory Problem: No autocommand event triggered before changing directory. (Ronnie Magatti) Solution: Add DirChangedPre. (closes vim/vim#9721) https://github.com/vim/vim/commit/28e8f73ae2d90009fd62cd60f97c2643ba44de68
* | | fix(api): validate command names in nvim_add_user_command (#17406)Gregory Anders2022-02-15
| |/ |/| | | | | This uses the same validation used when defining commands with `:command`.
* | fix: close floating windows when calling win_close()Rom Grk2022-02-10
|/
* Merge pull request #16818 from zeertzjq/vim-8.2.3454zeertzjq2022-02-03
|\ | | | | vim-patch:8.2.{3454,3455,3497,3540,3581,3678}: some "p" and "gp" patches
| * vim-patch:8.2.3581: reading character past end of linezeertzjq2022-01-29
| | | | | | | | | | | | Problem: Reading character past end of line. Solution: Correct the cursor column. https://github.com/vim/vim/commit/0b5b06cb4777d1401fdf83e7d48d287662236e7e
* | vim-patch:8.2.4283: using a variable for the return value is not neededzeertzjq2022-02-02
| | | | | | | | | | | | | | | | | | Problem: Using a variable for the return value is not needed. Solution: Return the value directly. (closes vim/vim#9687) https://github.com/vim/vim/commit/73257149d759a8e6ddbe555d2b5aa37b6cb8db8b Also move down variable declarations in changedir_func(). vim_chdirfile() doesn't need change.
* | vim-patch:8.2.3947: unnecessary check for NULL pointerzeertzjq2022-02-02
| | | | | | | | | | | | | | | | Problem: Unnecessary check for NULL pointer. Solution: Remove the check. (closes vim/vim#9434) https://github.com/vim/vim/commit/f38aad85cf8e4e930c96cb843bc136949c8dbd29 Reorder the two if branches to match upstream.
* | Merge pull request #17239 from seandewar/vim-8.2.3629Sean Dewar2022-01-31
|\ \ | | | | | | vim-patch:8.2.{3433,3629}
| * | vim-patch:8.2.3629: command completion in cmdline window uses global commandsSean Dewar2022-01-30
| | | | | | | | | | | | | | | | | | | | | Problem: Command completion in cmdline window uses global user commands, not local commands for the window where it was opened from. Solution: Use local commands. (closes vim/vim#9168) https://github.com/vim/vim/commit/a1198124370a366ff02811a43845a631b5c6e7f0
| * | vim-patch:8.2.3433: :delcommand does not take a -buffer optionSean Dewar2022-01-30
| |/ | | | | | | | | | | Problem: :delcommand does not take a -buffer option. Solution: Add the -buffer option. https://github.com/vim/vim/commit/bdcba24d8597abd5af509c2fb9206e64e713c711
* | Merge pull request #17068 from VVKot/vim-8.2.3933Sean Dewar2022-01-31
|\ \ | | | | | | vim-patch:8.2.{3933,3973,3978,4013,4032,4048}
| * | vim-patch:8.2.3933: after ":cd" fails ":cd -" is incorrectVVKot2022-01-31
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: After ":cd" fails ":cd -" is incorrect. Solution: Set the previous directory only after successfully changing directory. (Richard Doty, closes vim/vim#9419, closes vim/vim#8983) https://github.com/vim/vim/commit/3d0abad5bf4fe125e219f1b56c4e8200cb900e2a Adjust the test's error message check due to missing patch vim-patch:8.2.3973: tiny build fails Problem: Tiny build fails. Solution: Adjust #ifdefs https://github.com/vim/vim/commit/0f7a5e758c5d8be2d8f1ab4a145d1636a36d18b2 vim-patch:8.2.3978: build error when using dynamycally loaded Python 3 Problem: Build error when using dynamycally loaded Python 3. Solution: Adjust #ifdef. https://github.com/vim/vim/commit/6b1a99dfe33cf5a1d7f82febd81face85ac1b8a6 vim-patch:8.2.4013: build failure without the spell feature Problem: Build failure without the spell feature. Solution: Adjust #ifdefs. https://github.com/vim/vim/commit/e60b3c47d701e73ecbadb1b9a12bf82010cadae8 vim-patch:8.2.4032: ATTRIBUTE_NORETURN is not needed Problem: ATTRIBUTE_NORETURN is not needed. Solution: Use NORETURN(). (Ozaki Kiichi, closes vim/vim#9487) https://github.com/vim/vim/commit/e12406526a24768e6121450112eb2f9f92445ac5 vim-patch:8.2.4048: gcc complains about use of "%p" in printf Problem: gcc complains about use of "%p" in printf. Solution: Add (void *) typecast. (Dominique Pellé, closes vim/vim#9494) https://github.com/vim/vim/commit/c14f667626ba677a767d474324306e39096dc43e
* / vim-patch:8.2.3475: expression register set by not executed put command (#17211)zeertzjq2022-01-31
|/
* Merge pull request #16829 from zeertzjq/vim-8.2.2887zeertzjq2022-01-29
|\ | | | | vim-patch:8.2.{2887,3414,3999}: fullcommand() follow-up patches
| * vim-patch:8.2.3999: redundant check for NUL bytezeertzjq2022-01-05
| | | | | | | | | | | | Problem: Redundant check for NUL byte. Solution: Remove the check for a NUL byte. (closes vim/vim#9471) https://github.com/vim/vim/commit/c024ed9233feac4c8da7394a62bb50474803514f
| * vim-patch:8.2.3414: fullcommand() gives wrong name with buffer-local user ↵zeertzjq2022-01-05
| | | | | | | | | | | | | | | | | | | | command Problem: fullcommand() gives the wrong name if there is a buffer-local user command. (Naohiro Ono) Solution: Use a separate function to get the user command name. (closes vim/vim#8840) https://github.com/vim/vim/commit/80c88eac5a81dd9f1a96fc80cb8aab6c84fe7b86
| * vim-patch:8.2.2887: crash when passing null string to fullcommand()zeertzjq2022-01-05
| | | | | | | | | | | | Problem: Crash when passing null string to fullcommand(). Solution: Check for NULL pointer. (closes vim/vim#8256) https://github.com/vim/vim/commit/4c8e8c6e19b75d632b042aa0ba0a2ab769b2162e
* | Merge pull request #17145 from zeertzjq/vim-8.2.0128bfredl2022-01-27
|\ \ | | | | | | vim-patch:8.2.0128: cannot list options one per line
| * | vim-patch:8.2.0128: cannot list options one per linezeertzjq2022-01-20
| | | | | | | | | | | | | | | | | | Problem: Cannot list options one per line. Solution: Use ":set!" to list one option per line. https://github.com/vim/vim/commit/6b915c0c0ee7ef82f8d3d310a4345e098cb929b0
* | | Merge pull request #17156 from zeertzjq/vim-8.2.3584bfredl2022-01-23
|\ \ \ | | | | | | | | vim-patch:8.2.{3584,3586,3587}: :command "-keepscript" argument
| * | | vim-patch:8.2.3584: "verbose set efm" reports location of the :compiler commandzeertzjq2022-01-21
| |/ / | | | | | | | | | | | | | | | | | | | | | Problem: "verbose set efm" reports the location of the :compiler command. (Gary Johnson) Solution: Add the "-keepscript" argument to :command and use it when defining CompilerSet. https://github.com/vim/vim/commit/58ef8a31d7087d495ab1582be5b7a22796ac2451
* / / refactor: remove CSI unescaping and clean up related names and commentszeertzjq2022-01-21
|/ /
* | refactor: source ftplugin.vim separately from filetype.vim (#17129)Gregory Anders2022-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-on to #17040. The real benefit of #17040 was ensuring that the ftplugin FileType autocommand was defined first and thus always fired first. A side effect of the implementation in #17040 was that setting variables that modified the state of filetype detection (such as g:did_load_filetypes or g:do_filetype_lua) could no longer be set in the user's init file. Filetype detection can also no longer be prevented from loading by using `:filetype off`. This PR addresses both of those side effects by unconditionally sourcing ftplugin.vim and indent.vim before the user's init file (which ensures that these autocommands run first) and sourcing filetype.vim *after* the user's init file (thus allowing it to be blocked or modified).
* | Merge pull request #16848 from dundargoc/refactor/prevent-overflow-by-castingbfredl2022-01-08
|\ \ | |/ |/| refactor: avoid overflow by explicitly casting operand to a wider type
| * chore(fixup): bfredl size_tDundar Göc2022-01-01
| |
| * refactor: avoid overflow by explicitly casting operand to a wider typeDundar Göc2021-12-31
| |
* | feat: filetype.lua (#16600)Gregory Anders2022-01-04
|/ | | | Adds a new vim.filetype module that provides support for filetype detection in Lua.
* Merge pull request #16752 from gpanders/lua-user-commandsBjörn Linse2021-12-28
|\ | | | | feat(api): implement nvim_{add,del}_user_command
| * feat(api): implement nvim_{add,del}_user_commandGregory Anders2021-12-28
| | | | | | | | | | Add support for adding and removing custom user commands with the Nvim API.
* | 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>
* Merge pull request #16774 from zeertzjq/vim-8.2.2468Jan Edmund Lazo2021-12-25
|\ | | | | vim-patch:8.2.2468: not easy to get the full command name from a shortened one
| * fixup! vim-patch:8.2.2468: not easy to get the full command name from a ↵zeertzjq2021-12-26
| | | | | | | | shortened one
| * vim-patch:8.2.2468: not easy to get the full command name from a shortened onezeertzjq2021-12-25
| | | | | | | | | | | | Problem: Not easy to get the full command name from a shortened one. Solution: Add fullcommand(). (Martin Tournoij, closes vim/vim#7777) https://github.com/vim/vim/commit/038e09ee7645731de0296d255aabb17603276443
* | vim-patch:8.2.3780: ":cd" works differently on MS-Windowszeertzjq2021-12-25
|/ | | | | | Problem: ":cd" works differently on MS-Windows. Solution: Add the 'cdhome' option. (closes vim/vim#9324) https://github.com/vim/vim/commit/29f3a4591528130fded3fe1d63d74bcf22ab4f6c
* refactor: remove some chdir-related unnecessary calls and checkszeertzjq2021-12-20
| | | | | | | xmalloc() always retuns a valid pointer. Calling os_chdir() with the same directory as the current one doesn't do anything other than wasting time.
* 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.
* refactor(misc1): move out autocmd related functionsBjörn Linse2021-12-09
|
* lint (#16526)Jan Edmund Lazo2021-12-05
|
* 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.3430: no generic way to trigger an autocommand on mode changeMagnus Groß2021-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No generic way to trigger an autocommand on mode change. Solution: Add the ModeChanged autocommand event. (Magnus Gross, closes vim/vim#8856) https://github.com/vim/vim/commit/f1e8876fa2359b572d262772747405d3616db670 N/A patches for version.c: vim-patch:8.2.3434: function prototype for trigger_modechanged() is incomplete Problem: Function prototype for trigger_modechanged() is incomplete. Solution: Add "void". https://github.com/vim/vim/commit/28e591dd5080bbcd0f468f9d9597cedb716e28c9 Fixes #4399. Fixes #7416.
* | vim-patch:8.2.2350: using "void" for no reason (#16410)zeertzjq2021-11-30
| | | | | | | | | | Problem: Using "void" for no reason. Solution: Use "char *". https://github.com/vim/vim/commit/033135eb8eccd00c9ee72c6c0cf4b8b9f81bd269
* | Merge pull request #16362 from zeertzjq/vim-8.2.3617Jan Edmund Lazo2021-11-21
|\ \ | | | | | | vim-patch:8.2.{3468,3617,3618,3622}: some other CWD related patches
| * | vim-patch:8.2.3617: ":verbose pwd" does not mention 'autochdir' was appliedzeertzjq2021-11-19
| |/ | | | | | | | | | | Problem: ":verbose pwd" does not mention 'autochdir' was applied. Solution: Remember the last chdir was done by 'autochdir'. (issue vim/vim#9142) https://github.com/vim/vim/commit/0526815c15170a5926e1008600ec29d42d8b64c2
* | vim-patch:8.1.0753: printf format not checked for semsg() (#16378)Volodymyr Kot2021-11-20
| | | | | | | | | | | | | | | | Problem: printf format not checked for semsg(). Solution: Add GNUC attribute and fix reported problems. (Dominique Pelle, closes vim/vim#3805) https://github.com/vim/vim/commit/b5443cc46dd1485d6c785dd8c65a2c07bd5a17f3 (Most of the changes do not apply because Neovim already uses PRId64 and other spelling mistakes were already fixed.)
* | 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: reduce number of explicit char casts (#16077)dundargoc2021-11-16
| | | * refactor: reduce number of explicit char casts
* refactor(macroman): get rid of MB_COPY_CHAR macroBjörn Linse2021-11-14
| | | | clean up docs for MB_PTR_ADV and MB_PTR_BACK
* refactor(multibyte): eliminate mb_ptr2len alias for utfc_ptr2lenBjö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