aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/autocmd.c
Commit message (Collapse)AuthorAge
...
* refactor: replace char_u with charDundar Göc2022-09-10
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-09-06
| | | | Work on https://github.com/neovim/neovim/issues/459
* fix(events): triggered WinScrolled when only skipcol changed (#19972)zeertzjq2022-08-29
| | | | | | | | | fix(events): trigger WinScrolled when only skipcol changed vim-patch:9.0.0304: WinScrolled is not triggered when only skipcol changes Problem: WinScrolled is not triggered when only skipcol changes. Solution: Add w_last_skipcol and use it. (closes vim/vim#10998) https://github.com/vim/vim/commit/670ab0334b536e12d84810de88e73b7bcb01346d
* refactor: replace char_u with charDundar Göc2022-08-26
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Goc2022-08-25
| | | | Work on https://github.com/neovim/neovim/issues/459
* Merge pull request #19906 from bfredl/bigstagebfredl2022-08-24
|\ | | | | perf(api): allow to use an arena for return values
| * refactor(api): provide a temporary copy solution for nvim_call_atomicbfredl2022-08-24
| | | | | | | | | | | | Make the copy_object() family accept an optional arena. More than half of the callsites should be refactored to use an arena later anyway.
* | vim-patch:8.2.4749: <script> is not expanded in autocmd contextzeertzjq2022-08-23
|/ | | | | | | | | | | Problem: <script> is not expanded in autocmd context. Solution: Add the context to the pattern struct. (closes vim/vim#10144) Rename AutoPatCmd to AutoPatCmd_T. https://github.com/vim/vim/commit/eca7c60d68e63001dbe3c8e5d240b0895e607fc3 Omit AutoPatCmd -> AutoPatCmd_T rename as it is inconsistent. Use `.sn_name` instead of `->sn_name` as v8.2.0154 hasn't been ported. Omit acp_script_stx(), use member directly.
* vim-patch:8.1.2045: the option.c file is too big (#19854)zeertzjq2022-08-20
| | | | | | | | | | | Problem: The option.c file is too big. Solution: Split off the code dealing with strings. (Yegappan Lakshmanan, closes vim/vim#4937) https://github.com/vim/vim/commit/dac1347b4d9c1a1aef6aa73fdea08a9d1077d6ea Cherry-pick set_string_option_direct_in_win() from patch 8.1.1405. Cherry-pick shift_line() comment change from patch 8.1.2096. Move 'clipboard' default parsing to didset_string_options(). Reorder option flags to put Nvim-only flags at the end.
* 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>
* refactor: remove some unused includes (#19820)zeertzjq2022-08-17
| | | Replace grid.h in screen.h and screen.h in buffer.h with grid_defs.h
* 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: 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.
* vim-patch:8.1.1684: profiling functionality is spread outzeertzjq2022-08-12
| | | | | | | | | Problem: Profiling functionality is spread out. Solution: Put profiling functionality in profiling.c. (Yegappan Lakshmanan, closes vim/vim#4666) https://github.com/vim/vim/commit/fa55cfc69d2b14761e2a8bd85bc1e0d82df770aa Move proftime_T to types.h for now to avoid recursive #include.
* feat(lua): print source locations of lua callbacks (#19597)ii142022-08-03
| | | Co-authored-by: ii14 <ii14@users.noreply.github.com>
* vim-patch:9.0.0061: ml_get error with nested autocommandzeertzjq2022-07-28
| | | | | | Problem: ml_get error with nested autocommand. Solution: Also check line numbers for a nested autocommand. (closes vim/vim#10761) https://github.com/vim/vim/commit/5fa9f23a63651a8abdb074b4fc2ec9b1adc6b089
* revert: "vim-patch:9.0.0061: ml_get error with nested autocommand" (#19509)zeertzjq2022-07-26
| | | | | This reverts commit 6cee15da7235b6ba9c428ee43346415fe6a64e6c. Port this again when https://github.com/vim/vim/issues/10780 is fixed.
* vim-patch:9.0.0061: ml_get error with nested autocommandzeertzjq2022-07-23
| | | | | | Problem: ml_get error with nested autocommand. Solution: Also check line numbers for a nested autocommand. (closes vim/vim#10761) https://github.com/vim/vim/commit/5fa9f23a63651a8abdb074b4fc2ec9b1adc6b089
* vim-patch:8.1.1933: the eval.c file is too big (#19462)zeertzjq2022-07-22
| | | | | | | | Problem: The eval.c file is too big. Solution: Move code related to variables to evalvars.c. (Yegappan Lakshmanan, closes vim/vim#4868) https://github.com/vim/vim/commit/0522ba0359c96a8c2a4fc8fca0d3b58e49dda759 Name the new file eval/vars.c instead.
* refactor(object): get rid of redundant FIXED_TEMP_ARRAYbfredl2022-07-20
| | | | | use the MAXSIZE_TEMP_ARRAY + ADD_C pattern instead, as exemplified by the changes in this commit.
* vim-patch:8.1.1076: file for Insert mode is much too bigzeertzjq2022-07-20
| | | | | | | | | | | | Problem: File for Insert mode is much too big. Solution: Split off the code for Insert completion. (Yegappan Lakshmanan, closes vim/vim#4044) https://github.com/vim/vim/commit/7591bb39d58ece38a5fef984a08ea9012616c1f9 Cherry-pick ins_compl_len() -> get_compl_len() from patch 8.2.4001. Revert a71c5e9eb98fbb2ca88510269935cdcda37369fc: ctrl_x_mode is no longer a global variable, so l_ctrl_x_mode is no longer needed.
* refactor: replace char_uDundar Goc2022-07-02
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor(aucmd): call define_autocmd() directly for default autocmdsbfredl2022-06-28
|
* refactor: replace char_u #18429dundargoc2022-06-28
| | | Work on https://github.com/neovim/neovim/issues/459
* feat(autocmds): retrieve lua callback (#18642)kylo2522022-06-09
| | | add a new `callback` field to `nvim_get_autocmds`
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* fix(autocmds): separate command from desc (#18617)kylo2522022-05-21
|
* feat(api): enable nvim_exec_autocmds to pass arbitrary data (#18613)Gregory Anders2022-05-18
| | | | Add a "data" key to nvim_exec_autocmds that passes arbitrary data (API objects) to autocommand callbacks.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-16
| | | | Work on https://github.com/neovim/neovim/issues/459
* fix PVS warnings (#18459)dundargoc2022-05-15
| | | | | | | | | | | | | * fix(PVS/V547): remove ifs that are always true or false * fix(PVS/V560): remove partial conditions that are always true * fix(PVS/V1044): suppress warning about loop break conditions * fix(PVS/V1063): suppress "modulo by 1 operation is meaningless" * fix(PVS/V568): suppress "operator evaluates the size of a pointer" Also mark vim-patch:8.2.4958 as ported.
* refactor: replace char_u variables and functions with charDundar Goc2022-05-11
| | | | Work on https://github.com/neovim/neovim/issues/459
* vim-patch:8.2.4911: the mode #defines are not clearly named (#18499)zeertzjq2022-05-10
| | | | | | | | Problem: The mode #defines are not clearly named. Solution: Prepend MODE_. Renumber them to put the mapped modes first. https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435 A hunk from the patch depends on patch 8.2.4861, which hasn't been ported yet, but that should be easy to notice.
* 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-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
* vim-patch:8.2.3306: unexpected "No matching autocommands" (#17912)dundargoc2022-05-02
| | | | | | Problem: Unexpected "No matching autocommands". Solution: Do not give the message when aborting. Mention the arguments in the message. (closes vim/vim#8690) https://github.com/vim/vim/commit/1b154ea121d8374a129c3e30d50fa9742cd5faa1
* refactor: replace char_u variables and functions with char (#18288)dundargoc2022-04-30
| | | Work on https://github.com/neovim/neovim/issues/459
* 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.
* refactor(uncrustify): format all c code under /src/nvim/Dundar Goc2022-04-29
|
* refactor(build): remove unused includes #17078kylo2522022-04-26
| | | | Remove unused includes in src/nvim/buffer.c|h using the IWYU library. Yet another step towards #6371 and #549
* refactor: convert macros to all-caps (#17895)dundargoc2022-04-24
| | | Closes https://github.com/neovim/neovim/issues/6297
* fix/PVS #17863dundargoc2022-04-24
| | | | | | | | | | | | | | | | | | * fix(PVS/V002): disable rule completely V002: "Some diagnostic messages may contain incorrect line number in this file." This particular check seems unreliable. It says on their website https://pvs-studio.com/en/docs/warnings/v002/ that this warning occurs when there are multiline pragmas, but there are none in extmark.c. * fix(PVS/V756): ignore "counter is not used inside a nested loop" warning The nested loop starts with "AutoCmd *ac = ap->cmds" so "ap" is definitely used. * fix(PVS/V560): disable "a part of conditional expression is always true" * fix(PVS/V614): potentially uninitialized variable 'blen' used
* refactor: add pure attribute to pure functionsDundar Göc2022-04-13
| | | | | This will allow compilers that support the pure attribute to make further optimizations to functions.
* vim-patch:8.2.4713: plugins cannot track text scrollingzeertzjq2022-04-12
| | | | | | | | Problem: Plugins cannot track text scrolling. Solution: Add the WinScrolled event. (closes vim/vim#10102) https://github.com/vim/vim/commit/0937182d49fa8db50cec42785f22f1031760a0bd Skip User event in autocmd.txt, not needed unless #10689 is reverted.
* vim-patch:8.2.4723: the ModeChanged autocmd event is inefficientzeertzjq2022-04-10
| | | | | | | | | Problem: The ModeChanged autocmd event is inefficient. Solution: Avoid allocating memory. (closes vim/vim#10134) Rename trigger_modechanged() to may_trigger_modechanged(). https://github.com/vim/vim/commit/2bf52dd065495cbf28e28792f2c2d50d44546d9f Make v:event readonly for ModeChanged.
* feat(api)!: pass args table to autocommand callbacksGregory Anders2022-04-08
|
* fix(autocmd): restore autocmd showing behaviorzeertzjq2022-04-06
|
* fix(api): delete all autocmds with the same IDLewis Russell2022-04-01
|
* fix(api): improve autocmd error handlingLewis Russell2022-03-31
| | | | | - nvim_del_augroup_* now works with pcall - nvim_del_autocmd now errors for invalid ids