aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * | | | | | refactor(IWYU): fix includes for ugrid.h (#26267)zeertzjq2023-11-28
| | | | | | |
| * | | | | | vim-patch:9.0.2133: Cannot detect overstrike mode in Cmdline mode (#26263)zeertzjq2023-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Cannot detect overstrike mode in Cmdline mode Solution: Make mode() return "cr" for overstrike closes: vim/vim#13569 https://github.com/vim/vim/commit/d1c3ef1f47c87d1da056c56564e1985fe6f2931d
| * | | | | | refactor: move hashtab types to hashtab_defs.h (#26262)zeertzjq2023-11-28
| | | | | | |
| * | | | | | refactor(options): replace `p_force_(on|off)` with `immutable` (#26209)Famiu Haque2023-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: We use the `p_force_on` and `p_force_off` variables to check if a variable is immutable and what its default value is. This is not only hacky and unintuitive, but also is limited to only boolean options. Solution: Replace `p_force_on` and `p_force_off` with an `immutable` property for options, which indicates if an option is immutable. Immutable options cannot be changed from their default value. Ref: #25672.
| * | | | | | refactor: fix runtime_defs.h (#26259)zeertzjq2023-11-28
| |/ / / / /
| * | | | | refactor: rename types.h to types_defs.hdundargoc2023-11-27
| | | | | |
| * | | | | refactor: fix includes for api/autocmd.hdundargoc2023-11-27
| | | | | |
| * | | | | refactor: fix includes for iconv.hdundargoc2023-11-27
| | | | | |
| * | | | | refactor: create runtime_defs.hdundargoc2023-11-27
| | | | | |
| * | | | | build(IWYU): export generated headersdundargoc2023-11-27
| | | | | |
| * | | | | build(IWYU): fix includes for undo_defs.hdundargoc2023-11-27
| | | | | |
| * | | | | build(IWYU): fix includes for func_attr.hdundargoc2023-11-27
| | | | | |
| * | | | | build: enable IWYU on macdundargoc2023-11-27
| | | | | |
| * | | | | build(IWYU): replace most private mappings with pragmas (#26247)zeertzjq2023-11-27
| | | | | |
| * | | | | refactor: remove vim.h from more headers (#26244)zeertzjq2023-11-27
| | | | | |
| * | | | | docs: small fixes (#26154)dundargoc2023-11-27
| | | | | |
| * | | | | refactor: move Arena and ArenaMem to memory_defs.h (#26240)zeertzjq2023-11-27
| | | | | |
| * | | | | fix(lua): disallow vim.wait() in fast contextsLewis Russell2023-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `vim.wait()` cannot be called in a fast callback since the main loop cannot be run in that context as it is not reentrant Fixes #26122
| * | | | | refactor: move autocmd types to autocmd_defs.h (#26239)zeertzjq2023-11-27
| | | | | |
| * | | | | build(IWYU): replace public-to-public mappings with pragmas (#26237)zeertzjq2023-11-27
| | | | | |
| * | | | | build(clint): more precise check for "defs" headers (#26236)zeertzjq2023-11-27
| | | | | |
| * | | | | build(IWYU): remove arabic_defs.h (#26235)dundargoc2023-11-27
| | | | | | | | | | | | | | | | | | A _defs header is only needed if it's included by multiple files.
| * | | | | Merge pull request #26233 from bfredl/strictcharbfredl2023-11-26
| |\ \ \ \ \ | | | | | | | | | | | | | | refactor(encoding): remove redundant vim_isprintc_strict
| | * | | | | refactor(encoding): remove redundant vim_isprintc_strictbfredl2023-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is identical to vim_isprintc when encoding=utf-8 is used As this is the only internal encoding nvim supports, it is now redundant ref #2905
| * | | | | | build(IWYU): fix headers for arabic.hdundargoc2023-11-26
| |/ / / / /
| * | | | | refactor: move garray_T to garray_defs.h (#26227)zeertzjq2023-11-26
| | | | | |
| * | | | | build: sync IWYU and clint to ignore the same headers (#26228)dundargoc2023-11-26
| | | | | | | | | | | | | | | | | | Also fix headers for autocmd.c.
| * | | | | build: add check to clint to prevent non-defs header includesdundargoc2023-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also enable iwyu on headers, but add an ignore for each file separately. Work on https://github.com/neovim/neovim/issues/6371.
| * | | | | build(IWYU): map everything in the C99 specificationdundargoc2023-11-26
| | | | | |
| * | | | | build: rework IWYU mapping filesdundargoc2023-11-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create mapping to most of the C spec and some POSIX specific functions. This is more robust than relying files shipped with IWYU.
| * | | | | vim-patch:8.2.4685: when a swap file is found for a popup there is no dialog ↵zeertzjq2023-11-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#26207) Problem: When a swap file is found for a popup there is no dialog and the buffer is loaded anyway. Solution: Silently load the buffer read-only. (closes vim/vim#10073) https://github.com/vim/vim/commit/188639d75c363dffaf813e8e2209f7350ad1e871 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * | | | | fix(mouse): avoid dragging when clicking next to popupmenu (#26201)luukvbaal2023-11-25
| | | | | |
| * | | | | refactor(tui): remove unnecessary scheduling when suspending (#26190)zeertzjq2023-11-24
| | | | | | | | | | | | | | | | | | | | | | | | Nvim no longer calls loop_poll_events() when suspending, so it isn't necessary to schedule suspend_event.
| * | | | | fix(messages): validate msg_grid before using msg_grid_pos (#26189)zeertzjq2023-11-24
| | | | | |
| * | | | | fix(mouse): avoid dragging after click label popupmenu callback (#26187)luukvbaal2023-11-24
| | | | | |
| * | | | | vim-patch:9.0.2126: unused assignments when checking 'listchars' (#26182)zeertzjq2023-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Unused assignments when checking the value of 'listchars'. Solution: Loop only once when just checking the value. Add a test to check that this change doesn't cause double-free. closes: vim/vim#13559 https://github.com/vim/vim/commit/00624a2fa08d04bdded240d474e9cfdc193dbe10
| * | | | | vim-patch:9.0.2125: File info disappears when 'cmdheight' has decreased (#26180)zeertzjq2023-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: File info disappears immediately when 'cmdheight' has just decreased due to switching tabpage and 'shortmess' doesn't contain 'o' or 'O'. Solution: Make sure msg_row isn't smaller than cmdline_row. fixes: vim/vim#13560 closes: vim/vim#13561 https://github.com/vim/vim/commit/40ed6711bd385051021691980e8ce16375b4b510
| * | | | | fix(grid): don't draw beyond max column (#26172)zeertzjq2023-11-24
| | | | | |
| * | | | | fix: missing case in setxattr error handling (#26176)Nik Klassen2023-11-24
| | | | | | | | | | | | | | | | | | ENOTSUP case is present in vim, but doesn't appear to have included here.
| * | | | | perf: remove redundant strlen in skipwhite (#26177)ii142023-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | skipwhite was iterating over the input twice and scanning for the null byte character with strlen. this is redundant, because it's already covered by ascii_iswhite that accepts only space or tab character. Co-authored-by: ii14 <ii14@users.noreply.github.com>
| * | | | | fix(column): reset decor state before starting from topLuuk van Baal2023-11-23
| | | | | |
| * | | | | fix(column): apply numhl signs when 'signcolumn' is "no" (#26167)luukvbaal2023-11-23
| | | | | |
| * | | | | vim-patch:9.0.2121: [security]: use-after-free in ex_substitutezeertzjq2023-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: [security]: use-after-free in ex_substitute Solution: always allocate memory closes: vim/vim#13552 A recursive :substitute command could cause a heap-use-after free in Vim (CVE-2023-48706). The whole reproducible test is a bit tricky, I can only reproduce this reliably when no previous substitution command has been used yet (which is the reason, the test needs to run as first one in the test_substitute.vim file) and as a combination of the `:~` command together with a :s command that contains the special substitution atom `~\=` which will make use of a sub-replace special atom and calls a vim script function. There was a comment in the existing :s code, that already makes the `sub` variable allocate memory so that a recursive :s call won't be able to cause any issues here, so this was known as a potential problem already. But for the current test-case that one does not work, because the substitution does not start with `\=` but with `~\=` (and since there does not yet exist a previous substitution atom, Vim will simply increment the `sub` pointer (which then was not allocated dynamically) and later one happily use a sub-replace special expression (which could then free the `sub` var). The following commit fixes this, by making the sub var always using allocated memory, which also means we need to free the pointer whenever we leave the function. Since sub is now always an allocated variable, we also do no longer need the sub_copy variable anymore, since this one was used to indicated when sub pointed to allocated memory (and had therefore to be freed on exit) and when not. Github Security Advisory: https://github.com/vim/vim/security/advisories/GHSA-c8qm-x72m-q53q https://github.com/vim/vim/commit/26c11c56888d01e298cd8044caf860f3c26f57bb Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | | | | vim-patch:8.2.2784: Vim9: cannot use \=expr in :substitutezeertzjq2023-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Vim9: cannot use \=expr in :substitute. Solution: Compile the expression into instructions and execute them when invoked. https://github.com/vim/vim/commit/4c13721482d7786f92f5a56e43b0f5c499264b7e Vim9 script is N/A, including substitute_instr. Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * | | | | Merge pull request #26105 from luukvbaal/signmergebfredl2023-11-22
| |\ \ \ \ \ | | | | | | | | | | | | | | feat(extmarks): add sign name to extmark "details" array
| | * | | | | feat(extmarks): add sign name to extmark "details" arrayLuuk van Baal2023-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Unable to identify legacy signs when fetching extmarks with `nvim_buf_get_extmarks()`. Solution: Add "sign_name" to the extmark detail array. Add some misc. changes as follow-up to #25724
| * | | | | | build: reorder compiler option settingdundargoc2023-11-22
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The most general conditions should come before more specific conditions. For example, `UNIX` options needs to be specified before any distro-specific options. This way distro specific options takes priority over the general case in case there's a conflict.
| * | | | | fix(decorations): fix imbalanced sign countbfredl2023-11-22
| | | | | |
| * | | | | refactor(decorations): break up Decoration struct into smaller piecesbfredl2023-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the monolithic Decoration struct. Before this change, each extmark could either represent just a hl_id + priority value as a inline decoration, or it would take a pointer to this monolitic 112 byte struct which has to be allocated. This change separates the decorations into two pieces: DecorSignHighlight for signs, highlights and simple set-flag decorations (like spell, ui-watched), and DecorVirtText for virtual text and lines. The main separation here is whether they are expected to allocate more memory. Currently this is not really true as sign text has to be an allocated string, but the plan is to get rid of this eventually (it can just be an array of two schar_T:s). Further refactors are expected to improve the representation of each decoration kind individually. The goal of this particular PR is to get things started by cutting the Gordian knot which was the monolithic struct Decoration. Now, each extmark can either contain chained indicies/pointers to these kinds of objects, or it can fit a subset of DecorSignHighlight inline. The point of this change is not only to make decorations smaller in memory. In fact, the main motivation is to later allow them to grow _larger_, but on a dynamic, on demand fashion. As a simple example, it would be possible to augment highlights to take a list of multiple `hl_group`:s, which then would trivially map to a chain of multiple DecorSignHighlight entries. One small feature improvement included with this refactor itself, is that the restriction that extmarks cannot be removed inside a decoration provider has been lifted. These are instead safely lifetime extended on a "to free" list until the current iteration of screen drawing is done. NB: flags is a mess. but DecorLevel is useless, this slightly less so
| * | | | | vim-patch:9.0.2117: [security] use-after-free in qf_free_items (#26148)zeertzjq2023-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: [security] use-after-free in qf_free_items Solution: only access qfpnext, if it hasn't been freed Coverity discovered a possible use-after-free in qf_free_items. When freeing the qfline items, we may access freed memory, when qfp == qfpnext. So only access qfpnext, when it hasn't been freed. https://github.com/vim/vim/commit/567cae2630a51efddc07eacff3b38a295e1f5671 Co-authored-by: Christian Brabandt <cb@256bit.org>