aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* vim-patch:9.1.0380: Calculating line height for unnecessary amount of lines ↵luukvbaal2024-04-29
| | | | | | | | | | | (#28553) Problem: Calculating line height for unnecessary amount of lines with half-page scrolling (zhscn, after 9.1.0280) Solution: Replace "limit_winheight" argument with higher resolution "max" argument to which to limit the calculated line height in plines_m_win() to (Luuk van Baal) https://github.com/vim/vim/commit/32d701f51b1ed2834071a2c5031a300936beda13
* feat(defaults): improve :grep defaults #28545Luna Saphie Mittelbach2024-04-28
| | | | | | Based on feedback from #28324, pass -H and -I to regular grep (available on all platforms officially supported by Neovim), and only pass -uu to ripgrep. This makes :grep ignore binary files by default in both cases.
* Merge pull request #28532 from bfredl/regularizationbfredl2024-04-28
|\ | | | | refactor(build): make all generated c files headers
| * refactor(build): make all generated c files headersbfredl2024-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no "rule" or bad practice or whatever that says we cannot generate c files. it is is just that we have ~20 generated headers and ~2 generated sources and there is nothing in these two generated source files which sets them aparts. Lua bindings are not different from rpc bindings, and pathdef is not different from versiondef. So to simplify build logic and ease the future port to build.zig, streamline the build to only have generated headers, no direct generated .c files. Also "nlua_add_api_functions" had its prototype duplicated twice which defeated the point of having mandatory prototypes (one source of truth).
* | Merge #28522 handle ui_attach side effectsJustin M. Keyes2024-04-27
|\ \ | |/ |/|
| * fix(ui): set 'cmdheight' to zero for all open tabpagesLuuk van Baal2024-04-27
| | | | | | | | | | | | Problem: Enabling ext_messages claims to set 'cmdheight' to zero, but only does so for the current tabpage. Solution: Set stored 'cmdheight' value to zero for all tabpages.
| * fix(ui): update ext_ui widgets when attaching non-remote UILuuk van Baal2024-04-26
| | | | | | | | | | | | Problem: Updating internalized UI capabilities is postponed until a remote UI attaches. Solution: Always update active UI widgets in ui_refresh().
* | vim-patch:9.1.0374: wrong botline in BufEnter (#28530)zeertzjq2024-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When :edit an existing buffer, line('w$') may return a wrong result. Solution: Reset w_valid in curwin_init() (Jaehwang Jung) `do_ecmd()` reinitializes the current window (`curwin_init()`) whose `w_valid` field may have `VALID_BOTLINE` set. Resetting `w_botline` without marking it as invalid makes subsequent `validate_botline()` calls a no-op, thus resulting in wrong `line('w$')` value. closes: vim/vim#14642 https://github.com/vim/vim/commit/eb80b8304efb6dfeaa8d01dd41fe281df4894240 Co-authored-by: Jaehwang Jung <tomtomjhj@gmail.com>
* | vim-patch:fe1e2b5e2d65zeertzjq2024-04-27
| | | | | | | | | | | | | | | | | | | | runtime(doc): clarify syntax vs matching mechanism fixes: vim/vim#14643 https://github.com/vim/vim/commit/fe1e2b5e2d65f05d820f17db935b15454a63be06 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:partial:9.1.0373: ops.c code uses too many strlen() calls (#28508)zeertzjq2024-04-26
|/ | | | | | | | | | | Problem: ops.c code uses too many strlen() calls Solution: Refactor code and remove more strlen() calls (John Marriott) closes: vim/vim#14598 https://github.com/vim/vim/commit/38b9f45253f582ab63174376e321092f8a9a7808 Co-authored-by: John Marriott <basilisk@internode.on.net>
* fix(completion): improve popup window position (#26739)Raphael2024-04-25
|
* Merge pull request #28492 from bfredl/hotfixbfredl2024-04-25
|\ | | | | fix(lua): vim.fn.has('nvim-0.10') in fast context, used by vim.deprecate
| * fix(lua): vim.fn.has('nvim-0.10') in fast context, used by vim.deprecatebfredl2024-04-25
| |
* | feat(api): allow floats to be opened in non-current tabpage (#28480)Will Hopkins2024-04-25
| | | | | | \
* | refactor(source): remove unnecessary concatenation with Lua (#28499)zeertzjq2024-04-25
|/
* vim-patch:8.2.2332: Vim9: missing :endif not reported when using :windo (#28482)zeertzjq2024-04-24
| | | | | | | | Problem: Vim9: missing :endif not reported when using :windo. Solution: Pass a getline function to do_cmdline(). (closes vim/vim#7650) https://github.com/vim/vim/commit/9567efa1b4a41baca9b2266f5903d5dda7ad1e88 Co-authored-by: Bram Moolenaar <Bram@vim.org>
* vim-patch:9.1.0365: Crash when typing many keys with D- modifier (#28464)zeertzjq2024-04-23
| | | | | | | | | Problem: Crash when typing many keys with D- modifier (after 9.1.0227). Solution: Don't treat a 0x80 byte inside a special sequence as the start of a special sequence (zeertzjq). closes: vim/vim#14613 https://github.com/vim/vim/commit/6b13e3d4e46393b3a35eed7c27ae020bcbd46a9b
* fix(tui): disable DECRQM and DECRQSS queries for Terminal.app (#28453)Yoshimasa Niwa2024-04-23
| | | | | | | | | | | | | | | | | | | | | | **Problems** When launching Neovim on Terminal.app on macOS (Apple Terminal), it briefly shows like `p$qm+q5463;524742;73657472676266;73657472676262$qm` in orange background color partially on the screen. **Solution** Since Terminal.app seems not supporting DECRQM and DECRQSS queries, calling `tui_request_term_mode` and `tui_query_extended_underline` caused this unexpected output. Therefore, if we know it's Apple Terminal (when `nsterm` is `true`), don't call these checks. Tested on Terminal.app (2.14, 453) on macOS 14.4.1. Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Gregory Anders <greg@gpanders.com>
* vim-patch:9.1.0357: Page scrolling should place cursor at window boundaries ↵luukvbaal2024-04-22
| | | | | | | | | | (#28429) Problem: Page scrolling does not always place the cursor at the top or bottom of the window (Mathias Rav) Solution: Place the cursor at the top or bottom of the window. (Luuk van Baal) https://github.com/vim/vim/commit/4b6b0c4024df08dd8ce49dff3c76356ff81190c4
* fix(completion): check that healthcheck name is string (#28458)zeertzjq2024-04-22
|
* Merge pull request #28434 from glepnir/23120bfredl2024-04-22
|\ | | | | fix(float): wrong position when bufpos is out of range
| * fix(float): wrong position when bufpos is setglepnir2024-04-21
| | | | | | | | | | | | Problem: when lnum in bufpos is out of range the position of float is wired. Solution: avoid the height value out of buffer line range.
* | refactor(api): deprecate nvim_call_atomic #28433Justin M. Keyes2024-04-22
| | | | | | | | | | | | TODO: FUNC_API_REMOTE_ONLY APIs such as `nvim_ui_*` cannot (yet) be used in `nvim_exec_lua`. We can change FUNC_API_REMOTE_ONLY to allow Vimscript/Lua to pass an explicit `channel_id`. #28437
* | fix(window): don't go to unfocusable float when closing (#28455)zeertzjq2024-04-22
| |
* | refactor(treesitter): language loadingLewis Russell2024-04-21
| |
* | refactor: add function attributes to xmemcpyz() (#28435)zeertzjq2024-04-21
| | | | | | Also attempt to fix the new coverity warning.
* | perf(treesitter): incremental foldupdateJaehwang Jung2024-04-21
| | | | | | | | | | | | | | | | | | | | | | Problem: While the fold level computation is incremental, the evaluation of the foldexpr is done on the full buffer. Despite that the foldexpr reads from the cache, it can take tens of milliseconds for moderately big (10K lines) buffers. Solution: Track the range of lines on which the foldexpr should be evaluated.
* | Merge pull request #27872 from luukvbaal/cmdheightbfredl2024-04-21
|\ \ | | | | | | fix(ui): don't force 'cmdheight' to zero with ext_messages
| * | fix(ui): don't force 'cmdheight' to zero with ext_messagesLuuk van Baal2024-04-20
| | | | | | | | | | | | Remove remaining code that prevents non-zero 'cmdheight' with ext_messages.
* | | fix(api): do not update grid position in nvim_win_set_cursor (#28235)luukvbaal2024-04-21
| | | | | | | | | | | | Revert commit c971f538ab87b537ae4c97bd44167661c5691a2d. Forcing grid cursor position will need a new API like originally proposed in #27858.
* | | refactor(lua): "module" => "M" #28426Justin M. Keyes2024-04-20
|/ / | | | | | | Most of the codebase uses the `M` convention for Lua module. Update the last remaining cases.
* / refactor: add xmemcpyz() and use it in place of some xstrlcpy() (#28422)zeertzjq2024-04-20
|/ | | | | | Problem: Using xstrlcpy() when the exact length of the string to be copied is known is not ideal because it requires adding 1 to the length and an unnecessary strlen(). Solution: Add xmemcpyz() and use it in place of such xstrlcpy() calls.
* fix(showcmd): clear the rest properly (#28420)zeertzjq2024-04-20
|
* vim-patch:9.1.0351: No test that completing a partial mapping clears ↵zeertzjq2024-04-19
| | | | | | | | | | | 'showcmd' (#28406) Problem: No test that completing a partial mapping clears 'showcmd'. Solution: Complete partial mappings in Test_showcmd_part_map() instead of using :echo. Adjust some comments (zeertzjq). closes: vim/vim#14580 https://github.com/vim/vim/commit/094c4390bdf3473fab122aa02883e63ce4e66cdb
* build(windows): set longPathAware in manifest #28389Luna Saphie Mittelbach2024-04-18
| | | | | | | | | ref https://github.com/neovim/neovim/issues/28384 Allows Windows file APIs (and anything that uses them) to bypass the 260-character `MAX_PATH` limitation on Windows 10 1607 or later. NOTE: This change by itself does not change the behaviour of running Neovim. The system must also have the Windows registry key `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled` set to a `REG_DWORD` with value 1. See https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=powershell#enable-long-paths-in-windows-10-version-1607-and-later for more information.
* test: 'showcmd' with ext_messages and Visual selection (#28393)zeertzjq2024-04-18
| | | Also slightly reorder some code to make comments look less out-of-place.
* vim-patch:9.1.0343: 'showcmd' wrong for partial mapping with multibyte (#28392)zeertzjq2024-04-18
| | | | | | | | | | | | | | | | | | | | | | Problem: 'showcmd' is wrong for partial mapping with multibyte char, and isn't very readable with modifyOtherKeys. Solution: Decode multibyte char and merge modifiers into the char. (zeertzjq) This improves the following situations: - Multibyte chars whose individual bytes are considered unprintable are now shown properly in 'showcmd' area. - Ctrl-W with modifyOtherKeys now shows ^W in 'showcmd' area. The following situation may still need improvement: - If the char is a special key or has modifiers that cannot be merged into it, internal keycodes are shown in 'showcmd' area like before. This applies to keys typed in Normal mode commands as well, and it's hard to decide how to make it more readable due to the limited space taken by 'showcmd', so I'll leave it for later. closes: vim/vim#14572 https://github.com/vim/vim/commit/acdfb8a97995e0f81832207e39564ba795281108
* Merge pull request #28355 from theofabilous/msgpack-crash-fixbfredl2024-04-17
|\ | | | | fix(msgpack): retain grid line event memory
| * fix(msgpack): store grid line event as a valueTheo Fabi2024-04-16
| |
* | docs: remove mentions of scan-builddundargoc2024-04-17
| | | | | | | | | | These same checks are already checked by the clang-analyzer job, so this duplication is not necessary.
* | vim-patch:9.1.0341: Problem: a few memory leaks are found (#28382)zeertzjq2024-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: a few memory leaks are found (LuMingYinDetect ) Solution: properly free the memory Fixes the following problems: - Memory leak in f_maplist() fixes: vim/vim#14486 - Memory leak in option.c fixes: vim/vim#14485 - Memory leak in f_resolve() fixes: vim/vim#14484 - Memory leak in f_autocmd_get() related: vim/vim#14474 - Memory leak in dict_extend_func() fixes: vim/vim#14477 fixes: vim/vim#14238 closes: vim/vim#14517 https://github.com/vim/vim/commit/29269a71b5ac8a87c6c4beca35c173a19a2c9398 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.1.0340: Problem: Error with matchaddpos() and empty list (#28381)zeertzjq2024-04-17
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Error with matchaddpos() and empty list (@rickhow) Solution: Return early for an empty list fixes: vim/vim#14525 closes: vim/vim#14563 https://github.com/vim/vim/commit/f7d31adcc22eae852d6e7a5b59e9755ba7b51d35 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | test: API can return Lua function to Lua code (#28380)zeertzjq2024-04-17
| |
* | fix(lua): only free luarefs when returning from API (#28373)zeertzjq2024-04-17
|/
* feat(defaults): use ripgrep (rg) for 'grepprg' if availableLuna Saphie Mittelbach2024-04-16
|
* fix(api): ignore 'autochdir' when renaming other buf (#28376)zeertzjq2024-04-16
| | | | | | Problem: Renaming non-current buffer changes working directory when 'autochdir' is set. Solution: Temporarily disable 'autochdir'. Add more tests for the win_set_buf change.
* fix(api): ignore 'autochdir' when setting buf in other win (#28371)Raphael2024-04-16
| | | | | Problem: Wrong working directory when setting buffer in another window with 'autochdir' enabled. Solution: Temporarily disable 'autochdir'.
* test: make mapping tests more consistent (#28368)zeertzjq2024-04-16
| | | | | | - Test maparg() and maplist() in the same test. - Use matches() instead of string.match(). - Avoid overlong lines and strange spacing in exec_lua(). - Revert code change from last PR as the variable may be needed.
* test: getting autocmd Lua callback in Vimscript (#28367)zeertzjq2024-04-16
| | | Also remove unnecessary variable in API converter.
* fix(messages): avoid crash with :intro and ch=0 (#28343)zeertzjq2024-04-16
| | | | This just copies code from msg_start() to wait_return(). Not sure if there is a better place to put such a block.