aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* vim-patch:9.1.0755: quickfix list does not handle hardlinks well (#30637)zeertzjq2024-10-03
| | | | | | | | | | | | | | | | | | | | | Problem: quickfix list does not handle hardlinks well Solution: store original file name with quickfix entry (Austin Chang) Quickfix list shows entries with duplicate name if the file is opened with the path of hard links. The major cause is that qflist assumed that the filename passed into `qf_add_entry` matches the filename opened with the buffer. This patch handles this case by introduce a `qf_fname` into `qfline_S` structure. It stores the filename from `qf_add_entry` for each quickfix line. closes: vim/vim#15687 https://github.com/vim/vim/commit/29822996996550f68a781e85753ebd4d177f22da Co-authored-by: Austin Chang <austin880625@gmail.com>
* fix(ui): ensure screen update before waiting for input #30576fredizzimo2024-10-03
| | | | | | | | | | | Ensure the screen is fully updated before blocking for input. This did not always happen before, for example when setting `cursorline scrolloff=9999`, which lead to jerky movement when using some GUI applications. Because of the duality of redraw_later, this can't be done in command-line or when waiting for "Press ENTER". In many of those cases the redraw is expected AFTER the key press, while normally it should update the screen immediately. So, those special cases are excluded.
* refactor: fix incorrect use of enum (#30631)zeertzjq2024-10-03
|
* vim-patch:ae62fe5: runtime(doc): 'filetype', 'syntax' and 'keymap' only ↵zeertzjq2024-10-03
| | | | | | | | | allow alphanumeric + some characters (#30630) closes: vim/vim#15783 https://github.com/vim/vim/commit/ae62fe5c289e148b92b1d0bb912dcce7ebe14602 Co-authored-by: Milly <milly.ca@gmail.com>
* vim-patch:9.1.0754: fixed order of items in insert-mode completion menu (#30619)glepnir2024-10-03
| | | | | | | | | | | | | Problem: fixed order of items in insert-mode completion menu Solution: Introduce the 'completeitemalign' option with default value "abbr,kind,menu" (glepnir). Adding an new option `completeitemalign` abbr is `cia` to custom the complete-item order in popupmenu. closes: vim/vim#14006 closes: vim/vim#15760 https://github.com/vim/vim/commit/6a89c94a9eeee53481ced1a1260a177bffde4c0f
* build(deps): bump luajit to HEAD - 2240d8446Christian Clason2024-10-02
|
* vim-patch:9.1.0752: can set 'cedit' to an invalid value (#30616)zeertzjq2024-10-01
| | | | | | | | | | | Problem: can set cedit to an invalid value Solution: Check that the value is a valid key name (Milly) closes: vim/vim#15778 https://github.com/vim/vim/commit/25732435c56d762abb260499680939bd8882c708 Co-authored-by: Milly <milly.ca@gmail.com>
* vim-patch:9.1.0753: Wrong display when typing in diff mode with ↵zeertzjq2024-10-01
| | | | | | | | | | 'smoothscroll' (#30614) Problem: Wrong display when typing in diff mode with 'smoothscroll'. Solution: Use adjust_plines_for_skipcol() (zeertzjq). closes: vim/vim#15776 https://github.com/vim/vim/commit/47f8584a80006cd25e7dc6fa7fb1bfe2e768403c
* fix(tabline): restore behavior of click after last tabpage (#30602)zeertzjq2024-10-01
| | | Also correct the comments about tabpage labels in custom tabline.
* refactor: use ERROR_SET() to check for error (#30594)zeertzjq2024-10-01
| | | Replaces the only two places where kErrorTypeNone is checked explicitly.
* fix(diff): use mmfile_t in linematchLewis Russell2024-09-30
| | | | | | | | | | | | | | | Problem: Linematch used to use strchr to navigate a string, however strchr does not supoprt embedded NULs. Solution: Use `mmfile_t` instead of `char *` in linematch and introduce `strnchr()`. Also remove heap allocations from `matching_char_iwhite()` Fixes: #30505
* 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
|