aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua
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>
* feat(ui): allow to set the highlight namespace per windowbfredl2022-08-17
| | | | | - reimplement 'winhl' in terms of highlight namespaces - check for EOF in screen tests (to indicate a likely crash)
* 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: move non-symbols in ex_eval.h to ex_eval_defs.h (#19739)zeertzjq2022-08-12
| | | | This avoids including ex_eval.h in any other header, thus preventing future circular includes.
* 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>
* refactor: rename function prefix mb to the more accurate utf_cp (#19590)dundargoc2022-08-02
| | | | | The "cp" stands for codepoint. Closes https://github.com/neovim/neovim/issues/7401
* 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: enable -Wconversion warning for lua/treesitter.cDundar Goc2022-07-28
| | | | Work on https://github.com/neovim/neovim/issues/567
* 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
|
* Merge pull request #19205 from bfredl/luaerrbfredl2022-07-02
|\ | | | | fix(lua): don't leak memory on error
| * fix(lua): don't leak memory on errorbfredl2022-07-02
| |
* | 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
* | refactor: replace char_uDundar Goc2022-07-02
|/ | | | Work on https://github.com/neovim/neovim/issues/459
* 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.
* refactor: change type of linenr_T from long to int32_tDundar Goc2022-06-10
| | | | | | | | | | | | | The size of long varies depending on architecture, in contrast to the MAXLNUM constant which sets the maximum allowable number of lines to 2^32-1. This discrepancy may lead to hard to detect bugs, for example https://github.com/neovim/neovim/issues/18454. Setting linenr_T to a fix maximum size of 2^32-1 will prevent this type of errors in the future. Also change the variables `amount` and `amount_after` to be linenr_T since they're referring to "the line number difference" between two texts.
* 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.
* docs: fix typos (#18269)dundargoc2022-06-04
| | | | | | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Dan Sully <dan+github@sully.org> Co-authored-by: saher <msaher.shair@gmail.com> Co-authored-by: Stephan Seitz <stephan.seitz@fau.de> Co-authored-by: Benedikt Mùˆller <d12bb@posteo.de> Co-authored-by: Andrey Mishchenko <mishchea@gmail.com> Co-authored-by: Famiu Haque <famiuhaque@protonmail.com> Co-authored-by: Oliver Marriott <hello@omarriott.com>
* 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
|/
* refactor: replace char_u variables and functions with charDundar Goc2022-05-16
| | | | Work on https://github.com/neovim/neovim/issues/459
* 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
* Merge pull request #18398 from vigoux/perf/ts_reuse_listbfredl2022-05-03
|\ | | | | perf(treesitter): use a reuse list for query cursors
| * perf(treesitter): use a reuse list for query cursorsThomas Vigouroux2022-05-03
| |
* | fix(treesitter): bump match limit upThomas Vigouroux2022-05-03
|/ | | | | This avoids ignoring too many match results, and avoid highlighting being blank in some files.
* fix(coverity): use xstrndup() instead of vim_strsave() (#18363)zeertzjq2022-05-03
|