aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * fix(float): properly find last window of tabpage (#30571)zeertzjq2024-09-29
| |
| * docs: misc (#30177)dundargoc2024-09-29
| | | | | | | | | | Co-authored-by: Christian Clason <c.clason@uni-graz.at> Co-authored-by: Riley Bruins <ribru17@hotmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
| * refactor(multibyte): neo-casefolding without allocationbfredl2024-09-29
| | | | | | | | fixes #30400
| * refactor(event): change last use of klist to kvecbfredl2024-09-28
| | | | | | | | | | | | | | | | | | | | | | loop->children might have been a linked list because used to be modified in place while looped over. However the loops that exists rather schedules events to be processed later, outside of the loop, so this can not happen anymore. When a linked list is otherwise useful it is better to use lib/queue_defs.h which defines an _intrusive_ linked list (i e it doesn't need to do allocations for list items like klist ).
| * fix(column): set signcolumn width after splitting window (#30556)zeertzjq2024-09-28
| |
| * fix(window): making float with title/footer non-float leaks memory (#30551)zeertzjq2024-09-28
| |
| * fix(window): respect hide flag of float windows when switching (#30507)glepnir2024-09-28
| |
| * feat(defaults): pretty :help headings #30544Justin M. Keyes2024-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Headings in :help do not stand out visually. Solution: Define a non-standard `@markup.heading.1.delimiter` group and special-case it in `highlight_group.c`. FUTURE: This is a cheap workaround until we have #25718 which will enable: - fully driven by `vimdoc/highlights.scm` instead of using highlight tricks (`guibg=bg guifg=bg guisp=fg`) - better support of "cterm" ('notermguicolors')
| * fix(api): fix crash/leak with float title/footer on error (#30543)zeertzjq2024-09-27
| |
| * vim-patch:9.1.0743: diff mode does not handle overlapping diffs correctly ↵zeertzjq2024-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#30532) Problem: diff mode does not handle overlapping diffs correctly Solution: correct the logic to handle overlapping blocks (Yukihiro Nakadaira) Vim merges overlapped diff blocks and it doesn't work expectedly in some situation. closes: vim/vim#15735 https://github.com/vim/vim/commit/06fe70c183a53ea97cd42ace490d4fb9fd14f042 Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
| * fix(mbyte): check for utf8proc_map() failure (#30531)zeertzjq2024-09-26
| |
| * vim-patch:9.1.0742: getcmdprompt() implementation can be improvedzeertzjq2024-09-26
| | | | | | | | | | | | | | | | | | | | | | Problem: getcmdprompt() implementation can be improved Solution: Improve and simplify it (h-east) closes: vim/vim#15743 https://github.com/vim/vim/commit/25876a6cdd439054d0b3f920ccca0a435481de15 Co-authored-by: h-east <h.east.727@gmail.com>
| * vim-patch:9.1.0741: No way to get prompt for input()/confirm()zeertzjq2024-09-26
| | | | | | | | | | | | | | | | | | | | | | | | Problem: No way to get prompt for input()/confirm() Solution: add getcmdprompt() function (Shougo Matsushita) (Shougo Matsushita) closes: vim/vim#15667 https://github.com/vim/vim/commit/6908428560a0d6ae27bf7af6fcb6dc362e31926c Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
| * fix(channel): handle writing to file instead of pipe (#30519)zeertzjq2024-09-26
| |
| * build: fix or silence new clang-tidy warningsdundargoc2024-09-25
| |
| * fix(coverity): size_t overflow #30497Justin M. Keyes2024-09-25
| | | | | | | | | | | | | | | | | | | | | | CID 497370: Overflowed constant (INTEGER_OVERFLOW) Expression `tsize - ret.has_type_key`, where tsize=0 and ret.has_type_key=1, underflows the type that receives it, an unsigned integer 64 bits wide. CID 509910: Overflowed constant (INTEGER_OVERFLOW) Expression stack.size++, which is equal to 0, where stack.size is known to be equal to 18446744073709551615, overflows the type that receives it, an unsigned integer 64 bits wide
| * build(deps): bump wasmtime to v25.0.1Christian Clason2024-09-25
| |
| * docs: render @see, @note items in _meta/api.lua #30494Justin M. Keyes2024-09-25
| |
| * fix(paste): only record a paste when it's from RPC (#30491)zeertzjq2024-09-24
| | | | | | | | | | | | | | | | | | Problem: When using nvim_paste in a mapping during a macro recording, both the mapping and the paste are recorded, causing the paste to be performed twice when replaying the macro. Solution: Only record a paste when it is from RPC. Unfortunately this means there is no way for a script to make a recorded paste. A way to enable that can be discussed later if there is need.
| * docs: lua error patterns #30240Justin M. Keyes2024-09-24
| | | | | | | | Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net> Co-authored-by: Ananth Bhaskararaman <antsub@gmail.com>
| * feat(paste): unify cancel and error behavior (#30476)zeertzjq2024-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this PR, the behavior of nvim_paste is: - When vim.paste() returns false, return false to the client, but treat following chunks normally (i.e. rely on the client cancelling the paste as expected). - When vim.paste() throws an error, still return true to the client, but drain the following chunks in the stream without calling vim.paste(). There are two problems with such behavior: - When vim.paste() errors, the client is still supposed to send the remaining chunks of the stream, even though they do nothing. - Having different code paths for two uncommon but similar situations complicates maintenance. This PR makes both the cancel case and the error case return false to the client and drain the remaining chunks of the stream, which, apart from sharing the same code path, is beneficial whether the client checks the return value of nvim_paste or not: - If the client checks the return value, it can avoid sending the following chunks needlessly after an error. - If the client doesn't check the return value, chunks following a cancelled chunk won't be pasted on the server regardless, which leads to less confusing behavior.
| * refactor(api): rename Dictionary => DictJustin M. Keyes2024-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | In the api_info() output: :new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val') ... {'return_type': 'ArrayOf(Integer, 2)', 'name': 'nvim_win_get_position', 'method': v:true, 'parameters': [['Window', 'window']], 'since': 1} The `ArrayOf(Integer, 2)` return type didn't break clients when we added it, which is evidence that clients don't use the `return_type` field, thus renaming Dictionary => Dict in api_info() is not a breaking change.
| * refactor(api)!: rename Dictionary => DictJustin M. Keyes2024-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In the api_info() output: :new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val') ... {'return_type': 'ArrayOf(Integer, 2)', 'name': 'nvim_win_get_position', 'method': v:true, 'parameters': [['Window', 'window']], 'since': 1} The `ArrayOf(Integer, 2)` return type didn't break clients when we added it, which is evidence that clients don't use the `return_type` field, thus renaming Dictionary => Dict in api_info() is not (in practice) a breaking change.
| * build: silence "po" noise #30469Justin M. Keyes2024-09-23
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Noise in stderr from src/nvim/po/CMakeLists.txt during build: 48 substitutions on 48 lines "optwin.js" "optwin.js" 1299L, 57582B written 385 substitutions on 385 lines "nvim.pot" "nvim.pot" 9318L, 180177B written Solution: Run with `-c silent source` instead of `-S`.
| * vim-patch:9.1.0740: incorrect internal diff with empty file (#30471)zeertzjq2024-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: incorrect internal diff with an empty file Solution: Set pointer to NULL, instead of using an empty line file (Yukihiro Nakadaira) When using internal diff, empty file is read as one empty line file. So result differs from external diff. closes: vim/vim#15719 https://github.com/vim/vim/commit/f1694b439bb175d956b49da620f1253462ec507b Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
| * docs(api): nvim_get_runtime_file preserves 'runtimepath' order #30454Evgeni Chasnovski2024-09-22
| |
| * fix(paste): improve repeating of pasted text (#30438)zeertzjq2024-09-22
| | | | | | | | | | | | | | - Fixes 'autoindent' being applied during redo. - Makes redoing a large paste significantly faster. - Stores pasted text in the register being recorded. Fix #28561
| * vim-patch:9.1.0739: [security]: use-after-free in ex_getln.c (#30448)zeertzjq2024-09-21
| | | | | | | | | | | | | | | | | | | | Problem: [security]: use-after-free in ex_getln.c Solution: free pointer p a bit later (John Marriott) closes: vim/vim#15712 https://github.com/vim/vim/commit/a6de28755ec3fcc86d1ed0b744f1b410a8e9702d Co-authored-by: John Marriott <basilisk@internode.on.net>
| * refactor!: rename 'jumpoptions' flag "unload" to "clean" (#30418)zeertzjq2024-09-19
| | | | | | Follow-up to #29347
| * fix(coverity/509227/509228): tui driver_ti underflow #30341Devon Gardner2024-09-19
| | | | | | | | | | | | | | | | | | Problem: write() can return -1 but is cast to unsigned type causing coverity to detect possible overflowed integer Solution: Perform check to ensure all negative values are captured rather than just -1 before casting to unsigned type
| * feat(tui): builtin UI (TUI) sets client info #30397Justin M. Keyes2024-09-18
| | | | | | | | | | | | | | | | | | | | | | | | Problem: The default builtin UI client does not declare its client info. This reduces discoverability and makes it difficult for plugins to identify the UI. Solution: - Call nvim_set_client_info after attaching, as recommended by `:help dev-ui`. - Also set the "pid" field. - Also change `ui_active()` to return a count. Not directly relevant to this commit, but will be useful later.
| * fix(coverity): CID 509571 Uninitialized variables #30395Justin M. Keyes2024-09-18
| | | | | | | | | | | | | | | | | | | | | | | | /src/nvim/os/pty_proc_unix.c: 416 in pty_proc_init() 410 { 411 PtyProc rv; 412 rv.proc = proc_init(loop, kProcTypePty, data); 413 rv.width = 80; 414 rv.height = 24; 415 rv.tty_fd = -1; >>> CID 509571: Uninitialized variables (UNINIT) >>> Using uninitialized value "rv". Field "rv.winsize" is uninitialized. 416 return rv;
| * docs(eval): update param types of prompt-buffer functions (#30392)glepnir2024-09-16
| |
| * refactor: rename "process" => "proc" #30387Justin M. Keyes2024-09-15
| | | | | | | | | | | | | | | | | | | | | | | | Problem: - "process" is often used as a verb (`multiqueue_process_events`), which is ambiguous for cases where it's used as a topic. - The documented naming convention for processes is "proc". - `:help dev-name-common` - Shorter is better, when it doesn't harm readability or discoverability. Solution: Rename "process" => "proc" in all C symbols and module names.
| * Merge pull request #30378 from zeertzjq/vim-9.1.0729zeertzjq2024-09-14
| |\ | | | | | | vim-patch:9.1.{0729,0730}
| | * vim-patch:9.1.0730: Crash with cursor-screenline and narrow windowzeertzjq2024-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Crash with cursor-screenline and narrow window (elig0n) Solution: Don't set right_col when width2 is 0 (zeertzjq). fixes: vim/vim#15677 closes: vim/vim#15678 https://github.com/vim/vim/commit/59149f02692804267e7cc0665d0334f6ff4675be
| | * vim-patch:9.1.0729: Wrong cursor-screenline when resizing windowzeertzjq2024-09-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Wrong cursor-screenline when resizing window Solution: Invalidate saved left_col and right_col when width1 or width2 change. closes: vim/vim#15679 https://github.com/vim/vim/commit/86dc4f8b432233a01d022c3e71df53db58229713
| * | vim-patch:9.1.0728: [security]: heap-use-after-free in garbage collection ↵zeertzjq2024-09-14
| |/ | | | | | | | | | | | | | | | | | | | | | | | | with location list user data (#30377) Problem: heap-use-after-free in garbage collection with location list user data. Solution: Mark user data as in use when no other window is referencing the location list (zeertzjq) fixes: neovim/neovim#30371 closes: vim/vim#15683 https://github.com/vim/vim/commit/be4bd189d23854ddf1d85ad291d8f7ad3f22b7a0
| * refactor(stream.c): unused params in stream_close #30356Justin M. Keyes2024-09-12
| |
| * feat(log): use "ui" as default name for TUI client #30345Justin M. Keyes2024-09-11
| | | | | | | | | | | | | | | | | | | | | | | | | | The default "session name" for the builtin TUI is "ui". before: INF 2024-09-10T14:57:35.385 hello.sock os_exit:692: Nvim exit: 1 INF 2024-09-10T14:57:35.388 ?.4543 os_exit:692: Nvim exit: 1 after: INF 2024-09-10T14:59:19.919 hello.sock os_exit:692: Nvim exit: 1 INF 2024-09-10T14:59:19.922 ui.5684 os_exit:692: Nvim exit: 1
| * fix: replace NVIM with Nvim in default titlestring (#30348)Gregory Anders2024-09-11
| |
| * vim-patch:9.1.0727: too many strlen() calls in option.c (#30338)zeertzjq2024-09-10
| | | | | | | | | | | | | | | | | | | | | | Problem: too many strlen() calls in option.c Solution: refactor the code to reduce the number of strlen() calls (John Marriott) closes: vim/vim#15604 https://github.com/vim/vim/commit/95dacbb5fd53f76a7e369c554aaa02e86b81eca8 Co-authored-by: John Marriott <basilisk@internode.on.net>
| * vim-patch:d657d3d: runtime(doc): clarify the effect of the timeout for ↵zeertzjq2024-09-11
| | | | | | | | | | | | | | | | | | | | search()-functions (#30337) related: vim/vim#15657 related: vim/vim#15404 https://github.com/vim/vim/commit/d657d3d8fd635dbd78402358788dc58a96d04117 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * Merge pull request #30295 from glepnir/nfloatbfredl2024-09-10
| |\ | | | | | | fix(highlight): floating windows inherit NormalFloat from global-ns
| | * fix(highlight): floating windows inherit NormalFloat from global-nsglepnir2024-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: floating windows did not correctly inherit the NormalFloat highlight group from the global namespace when it was not defined in the window-specific namespace. This led to floating windows losing their background highlight when switching between namespaces. Solution: Updated the window highlight logic in update_window_hl() to handle the fallback. This fix resolves issues with floating window backgrounds not displaying as expected in certain namespace configurations.
| * | refactor(os/input.c): rename os_inchar => input_get #30327Justin M. Keyes2024-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The name `os_inchar` (from Vim's old `mch_inchar`) is ambiguous: "inchar" sounds like it could be reading or enqueuing (setting) input. Its docstring is also ambiguous. Solution: - Rename `os_inchar` to `input_get`. - Write some mf'ing docstrings. - Add assert() in TRY_READ().
| * | fix(server): CID 509282: DEADCODE #30316Justin M. Keyes2024-09-09
| | | | | | | | | listen_addr cannot be NULL at this point.
| * | fix(startup): server fails if $NVIM_APPNAME is relative dir #30310Justin M. Keyes2024-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: If $NVIM_APPNAME is a relative dir path, Nvim fails to start its primary/default server, and `v:servername` is empty. Root cause is d34c64e342dfba9248d1055e702d02620a1b31a8, but this wasn't noticed until 96128a5076b7 started reporting the error more loudly. Solution: - `server_address_new`: replace slashes "/" in the appname before using it as a servername. - `vim_mktempdir`: always prefer the system-wide top-level "nvim.user/" directory. That isn't intended to be specific to NVIM_APPNAME; rather, each *subdirectory* ("nvim.user/xxx") is owned by each Nvim instance. Nvim "apps" can be identified by the server socket(s) stored in those per-Nvim subdirs. fix #30256
| * | fix(startup): ignore broken $XDG_RUNTIME_DIR #30285Justin M. Keyes2024-09-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: $XDG_RUNTIME_DIR may be broken on WSL, which prevents starting (and even building) Nvim. #30282 Solution: - When startup fails, mention the servername in the error message. - If an autogenerated server address fails, log an error and continue with an empty `v:servername`. It's only fatal if a user provides a bad `--listen` or `$NVIM_LISTEN_ADDRESS` address. Before: $ nvim --headless --listen ./hello.sock nvim: Failed to --listen: "address already in use" $ NVIM_LISTEN_ADDRESS='./hello.sock' ./build/bin/nvim --headless nvim: Failed to --listen: "address already in use" After: $ nvim --headless --listen ./hello.sock nvim: Failed to --listen: address already in use: "./hello.sock" $ NVIM_LISTEN_ADDRESS='./hello.sock' ./build/bin/nvim --headless nvim: Failed $NVIM_LISTEN_ADDRESS: address already in use: "./hello.sock"
| * | vim-patch:9.1.0720: Wrong breakindentopt=list:-1 with multibyte or TABs (#30293)zeertzjq2024-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Wrong breakindentopt=list:-1 with multibyte chars or TABs in text matched by 'formatlistpat' (John M Devin) Solution: Use the width of the match text (zeertzjq) fixes: vim/vim#15634 closes: vim/vim#15635 https://github.com/vim/vim/commit/61a6ac4d0066317131528f1b3ecc3b3a2599a75c