aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval.c
Commit message (Collapse)AuthorAge
...
| * 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
* | Merge remote-tracking branch 'upstream/master' into userregJosh Rahm2023-01-25
|\|
| * 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.
| * | vim-patch:8.2.3788: lambda for option that is a function may be freedzeertzjq2022-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Lambda for option that is a function may be garbage collected. Solution: Set a reference in the funcref. (Yegappan Lakshmanan, closes vim/vim#9330) https://github.com/vim/vim/commit/6ae8fae8696623b527c7fb22567f6a3705b2f0dd Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * | vim-patch:8.2.3756: might crash when callback is not validzeertzjq2022-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: might crash when callback is not valid. Solution: Check for valid callback. (Yegappan Lakshmanan, closes vim/vim#9293) https://github.com/vim/vim/commit/4dc24eb5adbcc76838fae1e900936dd230209d96 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * | vim-patch:8.2.3751: cannot assign a lambda to an option that takes a functionzeertzjq2022-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot assign a lambda to an option that takes a function. Solution: Automatically convert the lambda to a string. (Yegappan Lakshmanan, closes vim/vim#9286) https://github.com/vim/vim/commit/6409553b6e3b4de4e1d72b8ee5445595214581ff Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * | feat: ":write ++p" creates parent dirs #20835Victor Blanchard2022-11-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - `:write ++p foo/bar/baz.txt` should create parent directories `foo/bar/` if they do not exist - Note: `:foo ++…` is usually for options. No existing options have a single-char abbreviation (presumably by design), so it's safe to special-case `++p` here. - Same for `writefile(…, 'foo/bar/baz.txt', 'p')` - `BufWriteCmd` can see the ++p flag via `v:cmdarg`. closes #19884
| * | vim-patch:8.2.3725: cannot use a lambda for 'completefunc' and 'omnifunc'zeertzjq2022-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot use a lambda for 'completefunc' and 'omnifunc'. Solution: Implement lambda support. (Yegappan Lakshmanan, closes vim/vim#9257) https://github.com/vim/vim/commit/8658c759f05b317707d56e3b65a5ef63930c7498 Comment out Vim9 script in tests. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * | vim-patch:8.2.3705: cannot pass a lambda name to function() or funcref()zeertzjq2022-11-07
| |/ | | | | | | | | | | | | | | | | | | Problem: Cannot pass a lambda name to function() or funcref(). (Yegappan Lakshmanan) Solution: Handle a lambda name differently. https://github.com/vim/vim/commit/eba3b7f6645c8f856132b4c06a009a3b0a44e21c Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.2.3055: strange error for assigning to "x.key" on non-dictionaryzeertzjq2022-11-06
| | | | | | | | | | | | | | | | | | Problem: Strange error for assigning to "x.key" on non-dictionary. Solution: Add a specific error message. (closes vim/vim#8451) https://github.com/vim/vim/commit/3a3b10e87a10dd0bc355618dbfc4a0a6c828aad7 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * refactor(eval): make get_lval() explicitly check for v:luazeertzjq2022-11-06
| | | | | | | | Needed for Vim patch 8.2.3055.
| * vim-patch:8.2.2920: still a way to shadow a builtin functionzeertzjq2022-11-06
| | | | | | | | | | | | | | | | | | Problem: Still a way to shadow a builtin function. (Yasuhiro Matsumoto) Solution: Check the key when using extend(). (issue vim/vim#8302) https://github.com/vim/vim/commit/6f1d2aa437744a7cb0206fdaa543a788c5a56c79 Co-authored-by: Bram Moolenaar <Bram@vim.org>