aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/executor.c
Commit message (Collapse)AuthorAge
* vim-patch:8.1.2057: the screen.c file is much too bigLewis Russell2022-08-19
| | | | | | | | | | | | | | | Problem: The screen.c file is much too big. Solution: Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#4943) https://github.com/vim/vim/commit/7528d1f6b5422750eb778dfb550cfd0b0e540964 This is an approximation vim-patch 8.1.2057. Applying the patch directly isn't feasible since our version of screen.c has diverged too much, however we still introduce drawscreen.c and drawline.c: - screen.c is now a much smaller file used for low level screen functions - drawline.c contains everything needed for win_line() - drawscreen.c contains everything needed for update_screen() Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(source): fix expand('<sfile>') no longer works for Luazeertzjq2022-08-16
|
* fix(source): make changing 'shellslash' change expand() resultzeertzjq2022-08-15
|
* refactor: change remaining sourcing_name/sourcing_lnum to exestackzeertzjq2022-08-14
| | | | Co-Authored-By: VVKot <volodymyr.kot.ua@gmail.com>
* vim-patch:8.2.0056: execution stack is incomplete and inefficientzeertzjq2022-08-14
| | | | | | | | | | | Problem: Execution stack is incomplete and inefficient. Solution: Introduce a proper execution stack and use it instead of sourcing_name/sourcing_lnum. Create a string only when used. https://github.com/vim/vim/commit/1a47ae32cdc19b0fd5a82e19fe5fddf45db1a506 Omit test_debugger.vim: superseded by later patches. Omit check_map_keycodes(): N/A. Omit kword_test.c: N/A (converted to a unit test).
* refactor: remove some unused includes (#19740)zeertzjq2022-08-12
| | | | Mostly avoids including eval.h, ex_cmds2.h and ex_docmd.h in other headers.
* refactor: use CLEAR_FIELD and CLEAR_POINTER macros (#19709)zeertzjq2022-08-11
| | | | | | | vim-patch:8.2.0559: clearing a struct is verbose Problem: Clearing a struct is verbose. Solution: Define and use CLEAR_FIELD() and CLEAR_POINTER(). https://github.com/vim/vim/commit/a80faa8930ed5a554beeb2727762538873135e83
* vim-patch:8.1.1210: support for user commands is spread out (#19653)zeertzjq2022-08-06
| | | | | | | Problem: Support for user commands is spread out. No good reason to make user commands optional. Solution: Move user command support to usercmd.c. Always enable the user_commands feature. https://github.com/vim/vim/commit/ac9fb18020d7e8bf16d02d45fbb02cf47328aaf7
* feat(lua): print source locations of lua callbacks (#19597)ii142022-08-03
| | | Co-authored-by: ii14 <ii14@users.noreply.github.com>
* Merge pull request #19437 from dundargoc/refactor/char_u-to-charbfredl2022-07-31
|\ | | | | refactor: replace char_u with char
| * refactor: replace char_u with charDundar Goc2022-07-31
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
* | docs: fix typos (#19024)dundargoc2022-07-31
|/ | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Valery Viktorovsky <viktorovsky@gmail.com>
* refactor: move FunPtr to types.h (#19466)zeertzjq2022-07-22
| | | | | This type itself is not eval-specific. Moving it to types.h can avoid including eval/funcs.h in many headers, and types.h is already included by many headers.
* fix(lua): make it possible to cancel vim.wait() with Ctrl-C (#19217)JP2022-07-19
|
* feat(lua): measure require in --startuptimeii142022-07-09
|
* feat(api): add `unsilent` to command APIszeertzjq2022-07-03
|
* vim-patch:8.2.1900: Vim9: command modifiers do not workzeertzjq2022-07-03
| | | | | | Problem: Vim9: command modifiers do not work. Solution: Make most command modifiers work. https://github.com/vim/vim/commit/02194d2bd54eacd0b7b9a017a3fe1702ecb80971
* fix(lua): clear got_int when calling vim.on_key() callback (#18979)zeertzjq2022-06-16
|
* Merge pull request #18947 from zeertzjq/vim-8.2.1897zeertzjq2022-06-14
|\ | | | | vim-patch:8.2.{1897,1898,5088}
| * vim-patch:8.2.5088: value of cmod_verbose is a bit complicated to usezeertzjq2022-06-14
| | | | | | | | | | | | | | | | Problem: Value of cmod_verbose is a bit complicated to use. Solution: Use zero for not set, value + 1 when set. (closes vim/vim#10564) https://github.com/vim/vim/commit/cd7496382efc9e6748326c6cda7f01003fa07063 Omit has_cmdmod(): only used for Vim9 script
| * vim-patch:8.2.1898: command modifier parsing always uses global cmdmodzeertzjq2022-06-14
| | | | | | | | | | | | Problem: Command modifier parsing always uses global cmdmod. Solution: Pass in cmdmod_T to use. Rename struct fields consistently. https://github.com/vim/vim/commit/e10044015841711b989f9a898d427bcc1fdb4c32
| * vim-patch:8.2.1897: command modifiers are saved and set inconsistentlyzeertzjq2022-06-14
| | | | | | | | | | | | | | | | | | Problem: Command modifiers are saved and set inconsistently. Solution: Separate parsing and applying command modifiers. Save values in cmdmod_T. https://github.com/vim/vim/commit/5661ed6c833e05467cab33cb9b1c535e7e5cc570 Cherry-pick: :0verbose fix from patch 8.2.4741
* | perf(memory): use an arena for RPC decodingbfredl2022-06-14
|/ | | | | | | | | drawback: tracing memory errors with ASAN is less accurate for arena allocated memory. Therefore, to start with it is being used for Object types around serialization/deserialization exclusively. This is going to have a large impact especially when TUI is refactored as a co-prosess as all UI events will be serialized and deserialized by nvim itself.
* fix: correct nlua_wait error message #18867resolritter2022-06-09
| | | the message is wrapped in `if (timeout < 0)`, which means 0 is a valid value
* fix(nvim_create_user_command): make `smods` work with `nvim_cmd`Famiu Haque2022-06-08
| | | | Closes #18876.
* feat: add preview functionality to user commandsFamiu Haque2022-05-31
| | | | Adds a Lua-only `preview` flag to user commands which allows the command to be incrementally previewed like `:substitute` when 'inccommand' is set.
* feat(nvim_create_user_command): pass structured modifiers to commandsFamiu Haque2022-05-29
| | | | | | | Adds an `smods` key to `nvim_create_user_command` Lua command callbacks, which has command modifiers but in a structured format. This removes the need to manually parse command modifiers. It also reduces friction in using `nvim_cmd` inside a Lua command callback.
* Merge pull request #18306 from lewis6991/fnfastbfredl2022-05-26
|\ | | | | feat(lua): allow some viml functions to run in fast
| * feat(lua): allow some viml functions to run in fastLewis Russell2022-05-17
| | | | | | | | | | This change adds the necessary plumbing to annotate functions in funcs.c as being allowed in run in luv fast events.
* | refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|/
* Merge pull request #18489 from dundargoc/refactor/remove-char_ubfredl2022-05-13
|\ | | | | refactor: replace char_u variables and functions with char
| * refactor: replace char_u variables and functions with charDundar Goc2022-05-11
| | | | | | | | Work on https://github.com/neovim/neovim/issues/459
* | feat(api): add `nvim_cmd`Famiu Haque2022-05-11
|/ | | | Adds the API function `nvim_cmd` which allows executing an Ex-command through a Dictionary which can have the same values as the return value of `nvim_parse_cmd()`. This makes it much easier to do things like passing arguments with a space to commands that otherwise may not allow it, or to make commands interpret certain characters literally when they otherwise would not.
* 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
* fix(coverity): use xstrndup() instead of vim_strsave() (#18363)zeertzjq2022-05-03
|
* refactor(uncrustify): change rules to better align with the style guideDundar Goc2022-04-29
| | | | | | | | | | | | | Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
* fix(api): correctly pass f-args for nvim_create_user_command (#18098)Gregory Anders2022-04-13
| | | | | Skip runs of whitespace and do not include `\` characters when followed by another `\` or whitespace. This matches the behavior of <f-args> when used with `:command`.
* Merge pull request #17459 from rktjmp/lua-error-tostringbfredl2022-03-18
|\ | | | | feat: __tostring lua errors if possible before showing in messages
| * feat: call __tostring on lua errors if possible before reporting to userOliver Marriott2022-02-25
| |
* | refactor(uncrustify): format all c filesDundar Göc2022-03-10
| |
* | fix(lua): don't use nlua_error when exiting earlybfredl2022-03-07
| | | | | | | | Screen state is not initialized yet. Print directly to stderr instead.
* | refactor(lua): move only runtime lua file in src/ to runtime/luabfredl2022-03-04
| | | | | | | | reorganize so that initialization is done in lua
* | refactor(lua): reorganize builtin modules, phase 1bfredl2022-03-03
| |
* | Merge pull request #15079 from shadmansaleh/feat/verbose_luabfredl2022-03-01
|\ \ | | | | | | feat(lua): add :verbose support for lua config
| * | fix: anonymous sid not workingshadmansaleh2022-02-28
| | |
| * | 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.
* | | feat(lua): add missing changes to autocmds lost in the rebaseTJ DeVries2022-02-28
|/ / | | | | | | Note: some of these changes are breaking, like change of API signatures
* | feat(lua): add api and lua autocmdsTJ DeVries2022-02-27
| |