aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds2.c
Commit message (Collapse)AuthorAge
...
* refactor: replace char_u variables and functions with charDundar Goc2022-05-11
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-05
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-04
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-04
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-05-03
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with charDundar Goc2022-04-30
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u variables and functions with char (#18288)dundargoc2022-04-30
| | | Work on https://github.com/neovim/neovim/issues/459
* refactor: convert macros to all-caps (#17895)dundargoc2022-04-24
| | | Closes https://github.com/neovim/neovim/issues/6297
* refactor: add pure attribute to pure functions (#18165)dundargoc2022-04-24
| | | | This will allow the compilers that support the pure attribute to make further optimizations.
* vim-patch:8.2.0836: not all :cdo output is visible (#18007)zeertzjq2022-04-06
| | | | | | | Problem: Not all :cdo output is visible. Solution: Reset 'shortmess' temporarily. (Yegappan Lakshmanan, closes vim/vim#6155) https://github.com/vim/vim/commit/14798ab9a5ee4b94f6c12f1986207569356acfc8 Cherry pick relevant changes form patches 8.1.1826 and 8.2.0557.
* refactor(ex_cmds): convert function comments to doxygen formatDundar Göc2022-03-16
|
* Merge pull request #17622 from ↵zeertzjq2022-03-09
|\ | | | | | | | | dundargoc/refactor/clang-tidy/remove-redundant-casts refactor/clang tidy/remove redundant casts
| * refactor: remove redundant castsDundar Göc2022-03-06
| |
* | fix(line continuation): set growsize to correct value (#17655)Sean Dewar2022-03-08
|/ | | Using MAX always sets growsize to 8000, unless ga_len is larger...
* feat(lua): show proper verbose output for lua configurationshadmansaleh2022-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `:verbose` didn't work properly with lua configs (For example: options or keymaps are set from lua, just say that they were set from lua, doesn't say where they were set at. This fixes that issue. Now `:verbose` will provide filename and line no when option/keymap is set from lua. Changes: - compiles lua/vim/keymap.lua as vim/keymap.lua - When souring a lua file current_sctx.sc_sid is set to SID_LUA - Moved finding scripts SID out of `do_source()` to `get_current_script_id()`. So it can be reused for lua files. - Added new function `nlua_get_sctx` that extracts current lua scripts name and line no with debug library. And creates a sctx for it. NOTE: This function ignores C functions and blacklist which currently contains only vim/_meta.lua so vim.o/opt wrappers aren't targeted. - Added function `nlua_set_sctx` that changes provided sctx to current lua scripts sctx if a lua file is being executed. - Added tests in tests/functional/lua/verbose_spec.lua - add primary support for additional types (:autocmd, :function, :syntax) to lua verbose Note: These can't yet be directly set from lua but once that's possible :verbose should work for them hopefully :D - add :verbose support for nvim_exec & nvim_command within lua Currently auto commands/commands/functions ... can only be defined by nvim_exec/nvim_command this adds support for them. Means if those Are defined within lua with vim.cmd/nvim_exec :verbose will show their location . Though note it'll show the line no on which nvim_exec call was made.
* vim-patch:8.2.4336: using :filter for :scriptnames does not workzeertzjq2022-02-10
| | | | | | | | Problem: Using :filter for :scriptnames does not work. (Ben Jackson) Solution: Call message_filtered(). (closes vim/vim#9720) https://github.com/vim/vim/commit/769f5895ebfd10535a0ad978f071da8f20178fc6 Cherry-pick a modeline from Vim patch 8.2.1432.
* feat(provider)!: remove support for python2 and python3.[3-5]Björn Linse2022-01-29
| | | | | | These versions of python has reached End-of-life. getting rid of python2 support removes a lot of logic to support two incompatible python versions in the same version.
* vim-patch:8.2.4133: output of ":scriptnames" goes into the message historyzeertzjq2022-01-27
| | | | | | | Problem: output of ":scriptnames" goes into the message history, while this des not happen for other commands, such as ":ls". Solution: Use msg_outtrans() instead of smsg(). (closes vim/vim#9551) https://github.com/vim/vim/commit/840f16202e1ae2d574507ef52a7e8a98775f243c
* 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
* 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>
* 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 line_breakcheck family of functions to os/input.cBjörn Linse2021-12-09
|
* 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
* fix(float): skip non-focusable windows for :windo (#15378)Daniel Steinberg2021-11-11
|
* 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
* 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
* refactor: uncrustify #16090dundargoc2021-10-29
|
* Merge #15994 feat(:source, nvim_exec): script-local scopeJustin M. Keyes2021-10-17
|\
| * feat(:source, nvim_exec): defer script item creation until s:var accessSean Dewar2021-10-14
| | | | | | | | | | | | | | | | For anonymous scripts, defer the creation of script items until an attempt to access a script-local variable is made. This dramatically reduces the number of script items created when using lots of vim.cmd and nvim_exec especially. This will mean <SID> usage fails until a script-local variable access is first made.
| * feat(:source, nvim_exec): support script-local variablesSean Dewar2021-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on #13143 (and #11507) with changes: - Omit script_type_E. Use sn_name == NULL to determine anon items. - Keep SID_STR. Used by anon :source for .lua files (no item). - Show SID in get_scriptname output (:verbose set). - Factor item creation into new_script_item. - Leave sc_seq = 0 (anon scripts don't re-use the same item when re-sourced). - Add tests for anon :source. Co-authored-by: Vikram Pal <vikrampal659@gmail.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* | refactor: reduce number of unique char castsDundar Göc2021-10-13
|/
* refactor: reduce number of unique char casts (#15995)dundargoc2021-10-12
|
* Refactor/uncrustify (#15790)dundargoc2021-09-29
| | | | | | | | | | | | | * refactor: format with uncrustify * fixup(dundar): fix functions comments * fixup(dundar): remove space between variable and ++/-- * fixup(dundar): better workaround for macro attributes This is done to be able to better use uncrustify rules for macros * fixup(justin): make preprocessors follow neovim style guide
* refactor: format with uncrustify #15778dundargoc2021-09-25
| | | * fixup: force exactly one whitespace between type and variable
* fix(PVS V507): false positiveJustin M. Keyes2021-09-24
| | | | | | | | | | https://pvs-studio.com/en/docs/warnings/v507/ "Pointer to local array 'sourcing_name_buf' is stored outside the scope of this array. Such a pointer will become invalid." False positive: `sourcing_name = save_sourcing_name` before returning from this scope.
* fix(startup): init.lua: set $MYVIMRC to absolute path #15748Justin M. Keyes2021-09-21
| | | | | | - main.c: remove os_setenv("MYVIMRC",…), it is already done by do_source(). - This also sets $MYVIMRC to a full (absolute) path. - code cleanup.
* refactor: format with uncrustify #15726dundargoc2021-09-20
|
* refactor(runtime): always use DIP_START when searching for runtime filesBjörn Linse2021-09-18
| | | | | | | | Now remove the addition of "start/*" packages in 'packpath' as explicit items in 'runtimepath'. This avoids 'runtimepath' from becoming very long when using a lot of plugins as packages. To get the effective search path as a list, use |nvim_list_runtime_paths()|
* fix(:source): copy curbuf lines to memory before sourcing #15111Sean Dewar2021-09-15
| | | | | | | | | It's possible for weirdness to happen if curbuf is modified while sourcing from it via :source (with no arguments). For example: - Deleting lines from or wiping curbuf can cause internal error E315 to be thrown from ml_get. - Changing the curbuf to another buffer while sourcing can cause lines from the new curbuf to then be sourced instead.
* fix(:source, nvim_exec): handle Vimscript line continuations #14809Sean Dewar2021-09-14
| | | | | | | | | | | Problem: Anonymous :source (no args) and nvim_exec() don't support Vimscript line continuations. Solution: Factor out the concat logic into concat_continued_line() and a CONCAT_CONTINUED_LINES macro for simple concatenations where lines are fetched individually. Closes #14807
* vim-patch:8.1.1195: Vim script debugger functionality needs cleanupSean Dewar2021-09-13
| | | | | | | | | | | Problem: Vim script debugger functionality needs cleanup. Solution: Move debugger code to a separate file. Add more tests. (Yegappan Lakshmanan, closes vim/vim#4285) https://github.com/vim/vim/commit/eead75c5e8e1f965548c55ee3a9388b2cb3afc36 Good to have for eval_expr_restore in v8.2.3417. Doesn't actually add any tests.
* refactor: replace TRUE/FALSE with true/falseDundar Göc2021-08-12
|
* refactor: replace TRUE/FALSE with true/falseDundar Göc2021-07-30
|
* chore: use codespell to spell check #15016dundargoc2021-07-07
|
* fix(source): Source giving E484 & parsing error at line 1 for lua filesshadmansaleh2021-06-21
| | | | | | | | | | | It's happening because do_source is only expected to return FAIL when it was unable to open file . But `nlua_exec_file` returns fail for parsing and execution error too . Those errors are emitted through `nlua_error`. So now return value of nlua_exec_file is ignored like do_cmdline. It now only returns fail when it was unable to open file that check is done before calling nlua_exec_file or do_cmdline. Errors in nlua_exec_file are still directly emitted through nlua_error like before.
* BugFix: Fix inconsistent verbose messageshadmansaleh2021-06-21
| | | | | | | When a keymap is set from lua currently verbose message says it's set from line 1. That's incorrect because we don't really know when it was set. So until proper :verbose support isn't added for sourceing lua it shouldn't say where it was set at.
* fixup(runtime): Fix lua runtime files not listedshadmansaleh2021-06-13
| | | | | | | | | lua runtime files weren't listed in :scriptname & profiler. This fixes that. * Add tests * Small doc tweeks
* refactor(source): Move lua file detection to do_sourceshadmansaleh2021-06-11
| | | | | | So now :source can run lua files too :) * feat: Add support for :[ranged]source for lua files