aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/eval
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'upstream/master' into usermarksusermarksJosh Rahm2023-01-25
|\
| * feat!: make iconv a non-optional depLewis Russell2023-01-23
| |
| * vim-patch:9.0.1233: search() loops forever if "skip" is TRUE for all matches ↵zeertzjq2023-01-23
| | | | | | | | | | | | | | | | | | | | (#21956) Problem: search() loops forever if "skip" is TRUE for all matches. Solution: Keep the position of the first match. https://github.com/vim/vim/commit/3d79f0a4309995956bd8889940cca22f7a15881d Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * 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
| * 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
| * vim-patch:8.2.4928: various white space and cosmetic mistakes (#21854)zeertzjq2023-01-17
| | | | | | | | | | | | | | | | Problem: Various white space and cosmetic mistakes. Solution: Change spaces to tabs, improve comments. https://github.com/vim/vim/commit/6ed545e79735f23ff8e650bc2f0967e5a0baedc9 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * refactor: fix IWYU mapping file and use IWYU (#21802)dundargoc2023-01-15
| | | | | | Also add the EXITFREE definition to main_lib rather than the nvim target, as the header generation needs the EXITFREE flag to work properly.
| * vim-patch:partial:9.0.1196: code is indented more than necessary (#21796)zeertzjq2023-01-14
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes vim/vim#11813) https://github.com/vim/vim/commit/e8575988969579f9e1439181ae338b2ff74054a8 Partial port as this depends on some previous eval and 'smoothscroll' patches. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * 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
| * build: remove clint error suppression #21782dundargoc2023-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix remaining clint errors and remove error suppression completely. Rename the lint targets to align with the established naming convention: - lintc-clint lints with clint.py. - lintc-uncrustify lints with uncrustify. - lintc runs both targets. lintc is also provided as a make target for convenience. After this change we can remove these files: https://github.com/neovim/doc/tree/gh-pages/reports/clint https://github.com/neovim/doc/blob/main/ci/clint-errors.sh
| * 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
| * vim-patch:partial:9.0.1166: code is indented more than necessary (#21716)zeertzjq2023-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes vim/vim#11792) https://github.com/vim/vim/commit/1cfb14aa972ccf3235ac67f07b7db1175b7c5384 Partial port as some highlight.c changes depend on previous patches. Cherry-pick fname_match() change from patch 8.2.4959. Omit internal_func_check_arg_types(): only used for Vim9 script. N/A patches for version.c: vim-patch:9.0.1167: EditorConfig files do not have their own filetype Problem: EditorConfig files do not have their own filetype. Solution: Add the "editorconfig" filetype. (Gregory Anders, closes vim/vim#11779) https://github.com/vim/vim/commit/d41262ed06564cef98a3800e2928e6e0db91abbf Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * 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
| * Merge pull request #21704 from bfredl/nofreebfredl2023-01-09
| |\ | | | | | | fix(rpc): don't free args on error in rpc_send_event
| | * fix(rpc): don't free args on error in rpc_send_eventbfredl2023-01-09
| | | | | | | | | | | | | | | fixup #21631 fixes #21690
| * | 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(api): do not allocate temporaries for internal eventsbfredl2023-01-03
| |
| * vim-patch:9.0.1137: some conditions are always false (#21628)zeertzjq2023-01-03
| | | | | | | | | | | | Problem: Some conditions are always false. Solution: Remove the useless conditions. (closes vim/vim#11776) https://github.com/vim/vim/commit/ea720aea851e645f4c8ec3b20afb27c7ca38184c
| * 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>
| * refactor(f_has): remove wrong comment (#21561)zeertzjq2022-12-28
| | | | | | | | Only one of "fork" and "system" should be defined. Also change the line above "win32" to match Vim.
| * 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.
| * vim-patch:8.2.1210: using ht_used when looping through a hashtab is less ↵zeertzjq2022-12-17
| | | | | | | | | | | | | | | | | | | | | | reliable Problem: Using ht_used when looping through a hashtab is less reliable. Solution: Use ht_changed in a few more places. https://github.com/vim/vim/commit/1f22cc5cdb2da867d6bbf54dd371f279c38a2f56 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * 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:9.0.1015: without /dev/urandom srand() seed is too predictable ↵zeertzjq2022-12-06
| | | | | | | | | | | | | | | | | | | | | | (#21303) Problem: Without /dev/urandom srand() seed is too predictable. Solution: Use micro seconds and XOR with process ID. (Yasuhiro Matsumoto, closes vim/vim#11656) https://github.com/vim/vim/commit/f0a9c004825ab686270ee57260652cce25e61049 Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
| * 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>
| * feat(aucmd_win): allow crazy things with hidden buffers (#21250)zeertzjq2022-12-02
| | | | | | | | Problem: Crash when doing crazy things with hidden buffers. Solution: Dynamically allocate the list of autocommand windows.
| * 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>
| * refactor: buffer_ensure_loaded()zeertzjq2022-11-29
| | | | | | | | Cherry-picked from Vim patch 8.1.1612.
| * vim-patch:9.0.0914: deletebufline() may move marks in the wrong windowzeertzjq2022-11-29
| | | | | | | | | | | | | | | | | | | | | | Problem: deletebufline() may move marks in the wrong window. Solution: Find a window for the buffer being changed. (closes vim/vim#11583) https://github.com/vim/vim/commit/228e422855d43965f2c3319ff0cdc26ea422c10f Cherry-pick code change from patch 9.0.0961. Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:9.0.0910: setting lines in another buffer may not work wellzeertzjq2022-11-29
| | | | | | | | | | | | | | | | | | Problem: Setting lines in another buffer may not work well. Solution: Make sure the buffer being changed has a window. (issue vim/vim#11558) https://github.com/vim/vim/commit/c934bfa1b765505e5fc491f2ee7cc106894cafc8 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
| * vim-patch:9.0.0733: use of strftime() is not safe (#21228)zeertzjq2022-11-29
| | | | | | | | | | | | | | | | | | | | Problem: Use of strftime() is not safe. Solution: Check the return value of strftime(). Use a larger buffer and correctly pass the available space. (Dominique Pellé, closes vim/vim#11348) https://github.com/vim/vim/commit/84d14ccdb50dc9f362066a2c83bfaf331314e5ea Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
| * 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
| * vim-patch:8.2.2466: max() and min() can give many error messageszeertzjq2022-11-25
| | | | | | | | | | | | | | | | | | Problem: Max() and min() can give many error messages. Solution: Bail out at the first error. (closes vim/vim#1039, closes vim/vim#7778) https://github.com/vim/vim/commit/ab65fc77c5389f7d3f788bbdc3d931561feab131 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:9.0.0926: Coverity warns for not using return value of dict_add()zeertzjq2022-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Coverity warns for not using return value of dict_add(). Solution: When dict_add() fails then don't call hash_remove(). https://github.com/vim/vim/commit/bc222152d8dea252aa5f1fa24b5536ed269feb92 N/A patches for version.c: vim-patch:9.0.0927: Coverity warns for using a NULL pointer Problem: Coverity warns for using a NULL pointer. Solution: Check for memory allocaion failure. https://github.com/vim/vim/commit/96cbbe29debba25d7eec8d01955c5ac01f5c420d Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:partial:9.0.0917: the WinScrolled autocommand event is not enough ↵zeertzjq2022-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#21161) Problem: The WinScrolled autocommand event is not enough. Solution: Add WinResized and provide information about what changed. (closes vim/vim#11576) https://github.com/vim/vim/commit/35fc61cb5b5eba8bbb9d8f0700332fbab38f40ca Omit "func_name" comment in tv_dict_extend(): Vim9 script only. Skip layout locking and E1312. Skip list_alloc_with_items() and list_set_item(). Since this overrides remaining changes in patch 9.0.0913, that patch can now be marked as fully ported: vim-patch:9.0.0913: only change in current window triggers the WinScrolled event N/A patches for version.c: vim-patch:9.0.0919: build failure with tiny features Problem: Build failure with tiny features. Solution: Adjust #ifdef's. https://github.com/vim/vim/commit/9c5b7cb4cf67c64648a324e9dfd1e17d793335a4 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * Merge pull request #20151 from dundargoc/refactor/char_u/13bfredl2022-11-22
| |\ | | | | | | refactor: replace char_u with char 13: remove `STRLEN` part 3
| | * refactor: replace char_u with charDundar Göc2022-11-19
| | | | | | | | | | | | 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:9.0.0916: getbufline() is inefficient for getting a single linezeertzjq2022-11-22
| |/ | | | | | | | | | | | | | | | | | | | | Problem: getbufline() is inefficient for getting a single line. Solution: Add getbufoneline(). https://github.com/vim/vim/commit/ce30ccc06af7f2c03762e5b18dde37b26ea6ec42 Cherry-pick part of usr_41.txt from patch 8.1.1628. Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.2.5167: get(Fn, 'name') on funcref returns special byte code ↵zeertzjq2022-11-19
| | | | | | | | | | | | | | | | | | | | | | | | (#21112) Problem: get(Fn, 'name') on funcref returns special byte code. Solution: Use the printable name. https://github.com/vim/vim/commit/1ae8c262df7083dfb4b41485508951c50eccc84c Cherry-pick printable_func_name() from patch 8.2.0149. 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.