aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
Commit message (Collapse)AuthorAge
...
* vim-patch:8.2.2783: duplicate code for setting byte in blob, blob test may failzeertzjq2023-02-28
| | | | | | | | | Problem: Duplicate code for setting byte in blob, blob test may fail. Solution: Call blob_set_append(). Test sort failure with "N". https://github.com/vim/vim/commit/e8209b91b9974da95899b51dba4058b411d04d5b Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.2782: Vim9: blob operations not fully testedzeertzjq2023-02-28
| | | | | | | | | | | | | | | | | | | Problem: Vim9: blob operations not fully tested. Solution: Make more blob tests run in Vim9 script. Fix filter(). Make insert() give an error for a null blob, like add(). https://github.com/vim/vim/commit/39211cba723a2cb58a97c7e08826713164b86efc vim-patch:8.2.3284: no error for insert() or remove() changing a locked blob Problem: No error for insert() or remove() changing a locked blob. Solution: Check a blob is not locked before changing it. (Sean Dewar, closes vim/vim#8696) https://github.com/vim/vim/commit/80d7395dcfe96158428da6bb3d28a6eee1244e28 Co-authored-by: Bram Moolenaar <Bram@vim.org> Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
* vim-patch:8.2.1890: Vim9: strange error for subtracting from a listzeertzjq2023-02-28
| | | | | | | | | | | Problem: Vim9: strange error for subtracting from a list. Solution: Check getting a number, not a string. (closes vim/vim#7167) https://github.com/vim/vim/commit/081db1a66d17e46ac3b03b7514f11a004a35009a Cherry-pick eval_addblob() and eval_addlist() from patch 8.2.0149. Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.2767: compiler warning for unused argumentzeertzjq2023-02-28
| | | | | | | | | Problem: Compiler warning for unused argument. Solution: Remove the argument. https://github.com/vim/vim/commit/bd6406f15db210b78fa24dece3bd021a7ac085dc Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.2765: Vim9: not all blob operations workzeertzjq2023-02-28
| | | | | | | | | | Problem: Vim9: not all blob operations work. Solution: Run more tests also with Vim9 script and :def functions. Fix what doesn't work. https://github.com/vim/vim/commit/0e3ff1919603ee4c4a347fdf761dbdbdeb068015 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.2757: Vim9: blob tests for legacy and Vim9 script are separatezeertzjq2023-02-28
| | | | | | | | | Problem: Vim9: blob tests for legacy and Vim9 script are separate. Solution: Add CheckLegacyAndVim9Success(). Make blob index assign work. https://github.com/vim/vim/commit/68452177ca4cda4a9d5f93892e437447cf9404c8 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.4318: various comment and indent mistakes, returning wrong ↵zeertzjq2023-02-24
| | | | | | | | | | | | | | | | | | | zero (#22385) Problem: Various comment and indent mistakes, returning wrong zero. Solution: Fix the mistakes. Return NULL instead of FAIL. https://github.com/vim/vim/commit/54969f4ef5825205ecde09ea80f4087fc3b68e5d N/A patches for version.c: vim-patch:8.2.3781: the option window script is outdated Problem: The option window script is outdated. Solution: Add several changes. https://github.com/vim/vim/commit/a416861c643b03fe5dec9f3bf8c1c9e054b5a9c7 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* feat: $NVIM_APPNAME #22128Ghjuvan Lacambre2023-02-16
| | | | | | | | | | | | | | | | | | | | This commit implements the ability to control all of the XDG paths Neovim should use. This is done by setting an environment variable named NVIM_APPNAME. For example, setting $NVIM_APPNAME makes Neovim look for its configuration directory in $XDG_CONFIG_HOME/$NVIM_APPNAME instead of $XDG_CONFIG_HOME/nvim. If NVIM_APPNAME is not set or is an empty string, "nvim" will be used as default. The usecase for this feature is to enable an easy way to switch from configuration to configuration. One might argue that the various $XDG environment variables can already be used for this usecase. However, setting $XDG environment variables also affects tools spawned by Neovim. For example, while setting $XDG_CONFIG_HOME will enable Neovim to use a different configuration directory, it will also prevent Git from finding its "default" configuration. Closes https://github.com/neovim/neovim/issues/21691
* vim-patch:8.2.0154: reallocating the list of scripts is inefficientzeertzjq2023-02-16
| | | | | | | | | | | Problem: Reallocating the list of scripts is inefficient. Solution: Instead of using a growarray of scriptitem_T, store pointers and allocate each scriptitem_T separately. Also avoids that the growarray pointers change when sourcing a new script. https://github.com/vim/vim/commit/21b9e9773d64de40994f8762173bdd8befa6acf7 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.0114: info about sourced scripts is scatteredzeertzjq2023-02-16
| | | | | | | | | | Problem: Info about sourced scripts is scattered. Solution: Use scriptitem_T for info about a script, including s: variables. Drop ga_scripts. https://github.com/vim/vim/commit/7ebcba61b20d25d23109fff73d0346ad44ba1b3b Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor: reduce scope of locals as per the style guide 3 (#22221)dundargoc2023-02-12
| | | refactor: reduce scope of locals as per the style guide
* build: treat clang-tidy warnings as errors (#22238)dundargoc2023-02-12
|
* refactor: replace char_u with char (#21901)dundargoc2023-02-11
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* build: enable MSVC level 3 warnings (#21934)dundargoc2023-02-11
| | | | | | MSVC has 4 different warning levels: 1 (severe), 2 (significant), 3 (production quality) and 4 (informational). Enabling level 3 warnings mostly revealed conversion problems, similar to GCC/clang -Wconversion flag.
* refactor(ui): remove some superfluous ui_flush() callsbfredl2023-02-09
| | | | | | | | - <expr> mapping has no business saving and restoring the low-level UI cursor. The cursor will be put in a reasonable position after input is processed, chill out. - TUI handles output needed for suspend - vgetc() family of function does flushing
* refactor: use uint8_t for blobs and ga_append() (#21916)zeertzjq2023-01-21
| | | | | | A blob is used as a sequence of bytes and usually accessed individually, not as as a NUL-terminuated string, so uint8_t should be better. Not sure about ga_append(), but using uint8_t leads to fewer casts.
* 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(eval.c): factor out get_number_tv() (#21893)zeertzjq2023-01-19
| | | It was refactored into a separate function in Vim in patch 8.2.0149.
* vim-patch:8.2.1698: cannot lock a variable in legacy Vim script like in Vim9 ↵zeertzjq2023-01-19
| | | | | | | | | | (#21883) Problem: Cannot lock a variable in legacy Vim script like in Vim9. Solution: Make ":lockvar 0" work. https://github.com/vim/vim/commit/a187c43cfe8863d48b2159d695fedcb71f8525c1 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* refactor: replace char_u with char 24 (#21823)dundargoc2023-01-18
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 23 (#21798)dundargoc2023-01-18
| | | 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
* fix(column)!: ensure 'statuscolumn' works with virtual and wrapped linesLuuk van Baal2023-01-16
| | | | | | | | | | Problem: The `'statuscolumn'` was not re-evaluated for wrapped lines, when preceded by virtual/filler lines. There was also no way to distinguish virtual and wrapped lines in the status column. Solution: Make sure to rebuild the statuscolumn, and replace variable `v:wrap` with `v:virtnum`. `v:virtnum` is negative when drawing virtual lines, zero when drawing the actual buffer line, and positive when drawing the wrapped part of a buffer line.
* refactor: replace char_u with char 21 (#21779)dundargoc2023-01-14
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 20 (#21714)dundargoc2023-01-13
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with char 19 (#21241)dundargoc2023-01-10
| | | | | * refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* feat(ui): add 'statuscolumn' optionluukvbaal2023-01-09
| | | | | | | | Problem: Unable to customize the column next to a window ('gutter'). Solution: Add 'statuscolumn' option that follows the 'statusline' syntax, allowing to customize the status column. Also supporting the %@ click execute function label. Adds new items @C and @s which will print the fold and sign columns. Line numbers and signs can be clicked, highlighted, aligned, transformed, margined etc.
* 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
* refactor: replace char_u with chardundargoc2023-01-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* feat!: remove hardcopyLewis Russell2023-01-03
| | | Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* vim-patch:9.0.1132: code is indented more than needed (#21626)zeertzjq2023-01-03
| | | | | | | | | | | Problem: Code is indented more than needed. Solution: Use an early return to reduce indentation. (Yegappan Lakshmanan, closes vim/vim#11769) https://github.com/vim/vim/commit/dc4daa3a3915fba11ac87d27977240d9a5e0d47d Omit expand_autoload_callback(): only applies to Vim9 script. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* fix(options): restore exists() behavior for options (#21510)zeertzjq2022-12-23
| | | | | Duplicating get_option_value() logic for an obscure future refactor isn't really worthwhile, and findoption() isn't used anywhere else outside the options code.
* refactor: replace char_u with char 16 - remove STRNCMP (#21208)dundargoc2022-12-21
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* fix(chansend): sending lines to terminal in reverse order on Windows #19315Enan Ajmain2022-12-08
| | | | | | | Problem: `chansend()` on Windows sends lines in reverse order. Cause: Using \n instead of \r\n for newlines on Windows. Solution: on Windows, use CRLF newline characters. Fixes #18501
* vim-patch:8.2.3900: it is not easy to use a script-local function for an optionzeertzjq2022-12-03
| | | | | | | | | | | | | Problem: It is not easy to use a script-local function for an option. Solution: recognize s: and <SID> at the start of the expression. (Yegappan Lakshmanan, closes vim/vim#9401) https://github.com/vim/vim/commit/8bb65f230d3025037f34021a72616038da0601ee Omit duplicate docs in fold.txt: removed in a later runtime update. Cherry-pick test_diffmode.vim changes from patch 8.2.1432. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* refactor: make sure getting a callback doesn't modify argumentzeertzjq2022-12-03
|
* vim-patch:9.0.0990: callback name argument is changed by setqflist()zeertzjq2022-12-03
| | | | | | | | | | Problem: Callback name argument is changed by setqflist(). Solution: Use the expanded function name for the callback, do not store it in the argument. (closes vim/vim#11653) https://github.com/vim/vim/commit/c96b7f5d2af241c5eb1589e9da3dc09e45355e65 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.3889: duplicate code for translating script-local function namezeertzjq2022-12-03
| | | | | | | | | | Problem: Duplicate code for translating script-local function name. Solution: Move the code to get_scriptlocal_funcname(). (Yegappan Lakshmanan, closes vim/vim#9393) https://github.com/vim/vim/commit/e7f4abd38b6e05100c699900c8f87281e363beb2 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* vim-patch:9.0.0967: leaking memory from autocmd windowszeertzjq2022-11-29
| | | | | | | | | Problem: Leaking memory from autocmd windows. Solution: Free window when auc_win is not NULL. https://github.com/vim/vim/commit/84497cd06f06516f6ce727ea00c47792ce16dc70 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.0.0965: using one window for executing autocommands is insufficientzeertzjq2022-11-29
| | | | | | | | | | | | | | | | | | Problem: Using one window for executing autocommands is insufficient. Solution: Use up to five windows for executing autocommands. https://github.com/vim/vim/commit/e76062c078debed0df818f70e4db14ad7a7cb53a N/A patches for version.c: vim-patch:9.0.0966: some compilers don't allow a declaration after a label Problem: Some compilers don't allow a declaration after a label. Solution: Move the declaration to the start of the block. (John Marriott) https://github.com/vim/vim/commit/f86490ed4fdab213a28f667abd055c023a73d645 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.1.2001: some source files are too big (#21231)zeertzjq2022-11-29
| | | | | | | Problem: Some source files are too big. Solution: Move buffer and window related functions to evalbuffer.c and evalwindow.c. (Yegappan Lakshmanan, closes vim/vim#4898) https://github.com/vim/vim/commit/261f346f8154c0ec7094a4a211c653c74e9f7c2e
* refactor: replace char_u with chardundargoc2022-11-28
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-11-26
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: remove old TODO comments that aren't relevant anymore (#21144)dundargoc2022-11-22
|
* vim-patch:8.2.2435: setline() gives an error for some typeszeertzjq2022-11-22
| | | | | | | | | Problem: setline() gives an error for some types. Solution: Allow any type, convert each item to a string. https://github.com/vim/vim/commit/3445320839a38b3b0c253513b125da8298ec27d6 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:8.2.0469: Vim9: no error for missing ] after listzeertzjq2022-11-18
| | | | | | | | | Problem: Vim9: no error for missing ] after list. Solution: Add error message. Add more tests. https://github.com/vim/vim/commit/ee619e5bc0992e818f2d9540b093b769b9c27651 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* 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:8.2.4038: various code not used when features are disabled (#21049)zeertzjq2022-11-14
| | | | | | | | | | | | | | | Problem: Various code not used when features are disabled. Solution: Add #ifdefs. (Dominique Pellé, closes vim/vim#9491) https://github.com/vim/vim/commit/748b308eebe8d8860888eb27da08333f175d547d N/A patches for version.c: vim-patch:8.2.2186: Vim9: error when using 'opfunc' Problem: Vim9: error when using 'opfunc'. Solution: Do not expect a return value from 'opfunc'. (closes vim/vim#7510) https://github.com/vim/vim/commit/5b3d1bb0f5180266c4de4d815b3ea856a2fb3519
* Merge pull request #20821 from dundargoc/refactor/clang-tidybfredl2022-11-08
|\ | | | | refactor: fix clang-tidy warnings
| * refactor: fix clang-tidy warningsdundargoc2022-11-06
| | | | | | | | | | | | | | | | Enable and fix bugprone-misplaced-widening-cast warning. Fix some modernize-macro-to-enum and readability-else-after-return warnings, but don't enable them. While the warnings can be useful, they are in general too noisy to enable.