aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_eval.c
Commit message (Collapse)AuthorAge
* refactor: replace char_u with char 25 (#21838)dundargoc2023-01-19
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 22 (#21786)dundargoc2023-01-17
| | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 18 (#21237)dundargoc2023-01-09
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 17 - remove STRLCPY (#21235)dundargoc2023-01-09
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* vim-patch:9.0.0577: buffer underflow with unexpected :finallyzeertzjq2022-12-03
| | | | | | | | | Problem: Buffer underflow with unexpected :finally. Solution: Check CSF_TRY can be found. https://github.com/vim/vim/commit/96b9bf8f74af8abf1e30054f996708db7dc285be Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor: replace char_u with chardundargoc2022-11-28
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: remove old TODO comments that aren't relevant anymore (#21144)dundargoc2022-11-22
|
* fix: pvs warnings (#21145)dundargoc2022-11-22
| | | | | | | | | | | * fix(PVS/V009): start file with special comment * fix(PVS/V501): identical sub-expressions for comparison * fix(PVS/V560): part of conditional expression is always true/false * fix(PVS/V593): review expression of type A = B < C * fix(PVS/V614): potentially uninitialized variable used
* build: allow IWYU to fix includes for all .c filesdundargoc2022-11-15
| | | | | | | | | | Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
* vim-patch:9.0.0869: bogus error when string used after :elseifzeertzjq2022-11-13
| | | | | | | | | | Problem: Bogus error when string used after :elseif. Solution: Do not consider a double quote the start of a comment. (closes vim/vim#11534) https://github.com/vim/vim/commit/28c56d501352bd98472d23667bade683877cadcc Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.4675: no error for missing expression after :elseifzeertzjq2022-11-13
| | | | | | | | | Problem: No error for missing expression after :elseif. (Ernie Rael) Solution: Check for missing expression. (closes vim/vim#10068) https://github.com/vim/vim/commit/fa010cdfb115fd2f6bae7ea6f6e63be906b5e347 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.0612: Vim9: no check for space before #commentzeertzjq2022-11-05
| | | | | | | | | | | Problem: Vim9: no check for space before #comment. Solution: Add space checks. https://github.com/vim/vim/commit/2c5ed4e3300378ce76c8d9c3818d6f73e5119f68 Omit ends_excmd2(): the same as ends_excmd() in legacy Vim script. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.0502: Vim9: some code is not testedzeertzjq2022-11-05
| | | | | | | | | Problem: Vim9: some code is not tested. Solution: Add more tests. Fix uncovered problems. https://github.com/vim/vim/commit/e8c4abbbd711af8fd3ed85ea69e9ac3d63a0d879 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* build(lint): remove clint.py rules for braces #20880dundargoc2022-11-01
| | | | | Uncrustify is the source of truth where possible. Remove any redundant checks from clint.py. See also https://github.com/neovim/neovim/pull/18563
* refactor: clint (#20600)Lewis Russell2022-10-12
|
* refactor: replace char_u with charDundar Göc2022-09-11
| | | | 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
* refactor: migrate comment style (#20012)Lewis Russell2022-09-02
| | | | | | | | | Done automatically using the following perl command: perl -pi -0777pe 's#\n\K */\*\n(.+?)\s*\*/\n#join("\n", map { $_ =~ s:^\s*\K \*://:; $_ } split("\n", $1)) . "\n"#sge' src/nvim/**/*.c Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* fix(exceptions): restore `did_throw` (#20000)Sean Dewar2022-08-30
| | | | | | | | | | | | | | | | | | `!did_throw` doesn't exactly imply `!current_exception`, as `did_throw = false` is sometimes used to defer exception handling for later (without forgetting the exception). E.g: uncaught exception handling in `do_cmdline()` may be deferred to a different call (e.g: when `try_level > 0`). In #7881, `current_exception = NULL` in `do_cmdline()` is used as an analogue of `did_throw = false`, but also causes the pending exception to be lost, which also leaks as `discard_exception()` wasn't used. It may be possible to fix this by saving/restoring `current_exception`, but handling all of `did_throw`'s edge cases seems messier. Maybe not worth diverging over. This fix also uncovers a `man_spec.lua` bug on Windows: exceptions are thrown due to Windows missing `man`, but they're lost; skip these tests if `man` isn't executable.
* refactor: replace char_u with char 4 (#19987)dundargoc2022-08-30
| | | | | | | * refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-08-29
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: change FALSE/TRUE to false/trueLewis Russell2022-08-26
| | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor: replace char_u with charDundar Goc2022-08-25
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: pre-incr to post-incrLewis Russell2022-08-25
|
* vim-patch:8.2.2289: Vim9: 'cpo' can become empty (#19887)zeertzjq2022-08-22
| | | | | | | | Problem: Vim9: 'cpo' can become empty. Solution: Use empty_option instead of an empty string. Update quickfix buffer after restoring 'cpo'. (closes vim/vim#7608) https://github.com/vim/vim/commit/e5a2dc87fd9d63dfd0d9c379e363ee8b8c05b14c Omit test as it is Vim9 script.
* refactor: change pre-decrement/increment to post (#19799)Lewis Russell2022-08-16
| | | Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* vim-patch:8.2.1653: expand('<stack>') does not include the final line numberzeertzjq2022-08-15
| | | | | | Problem: Expand('<stack>') does not include the final line number. Solution: Add the line nuber. (closes vim/vim#6927) https://github.com/vim/vim/commit/4f25b1aba050b85fa97ca2316aa04dd4b0b22530
* vim-patch:8.2.1297: when a test fails it's often not easy to see wherezeertzjq2022-08-15
| | | | | | | | | Problem: When a test fails it's often not easy to see what the call stack is. Solution: Add more entries from the call stack in the exception message. https://github.com/vim/vim/commit/a5d0423fa16f18b4576a2a07e50034e489587a7d Use docs from latest Vim.
* vim-patch:8.2.0823: Vim9: script reload test is disabledzeertzjq2022-08-14
| | | | | | | | | | Problem: Vim9: script reload test is disabled. Solution: Compile a function in the context of the script where it was defined. Set execution stack for compiled function. Add a test that an error is reported for the right file/function. https://github.com/vim/vim/commit/25e0f5863e9010a75a1ff0d04e8f886403968755 Omit stack_top_is_ufunc(): only used by Vim9 script.
* 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.
* vim-patch:8.2.1281: the "trailing characters" error can be hard to understandzeertzjq2022-08-07
| | | | | | Problem: The "trailing characters" error can be hard to understand. Solution: Add the trailing characters to the message. https://github.com/vim/vim/commit/2d06bfde29bd3a62fc85823d2aa719ef943bd319
* vim-patch:8.2.1280: Ex command error cannot contain an argumentzeertzjq2022-08-07
| | | | | | | | | Problem: Ex command error cannot contain an argument. Solution: Add ex_errmsg() and translate earlier. Use e_trailing_arg where possible. https://github.com/vim/vim/commit/8930caaa1a283092aca81fdbc3fcf15c7eadb197 Remove duplicate test file 062_tab_pages_spec.lua
* 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
* 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-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 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: convert macros to all-caps (#17895)dundargoc2022-04-24
| | | Closes https://github.com/neovim/neovim/issues/6297
* Merge pull request #18110 from dundargoc/refactor/remove-char_uGregory Anders2022-04-24
|\ | | | | refactor: replace char_u variables and functions with char
| * refactor: add function xstrnsaveDundar Goc2022-04-16
| | | | | | | | | | | | | | xstrnsave is a clone of vim_strnsave that uses char* instead of char_u*. Its purpose short-term is to help reduce the number of casts and for long-term to replace vim_strnsave as the need to use char_u is eliminated.
* | 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.3486: illegal memory access with invalid sequence of commandsSean Dewar2022-04-13
| | | | | | | | | Problem: Illegal memory access with invalid sequence of commands. Solution: Do not call leave_block() when not in a try block. (closes vim/vim#8966) Reset did_emsg so that exception is shown as an error. https://github.com/vim/vim/commit/cce81e9673fe8d056e8eef310d9919620eccb2f2 Vim9script is N/A, which includes leave_block.
* vim-patch:8.2.3478: still crash with error in :catch and also in :finallySean Dewar2022-04-13
| | | | | | | | Problem: Still crash with error in :catch and also in :finally. Solution: Only call finish_exception() once. (closes vim/vim#8954) https://github.com/vim/vim/commit/f67d3fb7363ebc9454f9bb582de3978609a4fd6b Exclude CSF_FUNC_DEF change (Vim9script).
* vim-patch:8.2.3470: crash with error in :catch and also in :finallySean Dewar2022-04-13
| | | | | | Problem: Crash with error in :catch and also in :finally. Solution: Only discard an exception if there is one. (closes vim/vim#8954) https://github.com/vim/vim/commit/a684a684096ecef3fbaee39c573b47423235d6b1
* refactor: convert function comments to doxygen formatDundar Göc2022-03-15
|