Commit Graph

20094 Commits

Author SHA1 Message Date
Sean Dewar
f5d03ec930 fix(api): style=minimal not applied immediately for unmoved split
Problem: nvim_win_set_config with style="minimal" does not take immediate effect
when a split is not moved.

Solution: don't skip nvim_win_set_config's epilogue when only a resize may be
needed. De-duplicate resize logic and remove unnecessary redraw. (win_set*_win
already handles that)
2026-03-08 19:41:33 +00:00
Christian Clason
908591c61c refactor(lua): adapt to Stylua 2.4.0 2026-03-07 18:23:35 +01:00
Marc Jakobi
34a59e30db docs(api): clarify nvim_win_set_buf documentation #37201 2026-03-06 13:34:47 -05:00
Yochem van Rosmalen
ac6cf5b03b fix(gen): alias /doc/user/helptag.html to /doc/user/helptag/ #38156
Problem:
helptag.html is used to search for the online help documentation of a
specified tag. The previous URL was `/doc/user/helptag.html` but that
switched to `/doc/user/helptag/` in
https://github.com/neovim/neovim.github.io/pull/437. The alias of the
.html page was added to all other doc pages but forgotten for the
helptag.html page

Solution:
Add the alias to the helptag.html page too
2026-03-06 13:20:40 -05:00
luukvbaal
fde1c07891 fix(cmdline): cmdline_block events for :lua debug.debug() #38171
Problem:  :lua debug.debug() is missing cmdline_block events.
Solution: Emit cmdline_block_show/append/hide events for :lua
          debug.debug().
2026-03-06 13:17:12 -05:00
glepnir
d19dc6339d fix(api): nvim_set_hl crashes when url= key is passed
Problem: Calling nvim_set_hl() with url= crashes because it tries to
free arena-owned string memory.

Solution: Remove the bad free and return a validation error instead.
2026-03-06 10:54:28 +01:00
zeertzjq
066891f5d3 revert: "fix(tui): server --listen error sometimes not visible (#38027)" (#38175)
This reverts commit ab8371a26c.

Need to think of a different solution, which may require adding new
flags to nvim_ui_attach() (e.g. passing stdout or stderr fd).
2026-03-06 08:49:09 +08:00
bfredl
2f07bd0c1f Merge pull request #38148 from bfredl/gnuology
fix(build): glibc 2.43 happened
2026-03-05 11:52:56 +01:00
bfredl
f0d981544b fix(build): glibc 2.43 happened
using the GNU compiler we just get a bunch of const warnings we can fix.
clang, however, gets really upset that the standard library suddenly
starts using a lot of c11 features, despite us being in -std=gnu99 mode.

Basically, _GNU_SOURCE which we set is taken as a _carte blanche_ by the
glibc headers to do whatever they please, and thus we must inform clang
that everything is still OK.
2026-03-05 10:48:25 +01:00
zeertzjq
5048d9aa2a fix(tui): call tcdrain() on stdout and stderr on exit (#38154)
Problem:
On FreeBSD, output written to TTY may be lost on exit.
Example test failure:

FAILED
test/functional/terminal/tui_spec.lua @
2521:
TUI no assert failure on deadly signal #21896
test/functional/terminal/tui_spec.lua:2523: Row 1 did not match.
Expected:
  |*Nvim: Caught deadly signal 'SIGTERM'              |
  |*                                                  |
  |*[Process exited 1]^                                |
  |*                                                  |
  |*                                                  |
  |                                                  |
  |{5:-- TERMINAL --}                                    |
Actual:
  |*                                                  |
  |*[Process exited 1]{100:^                                }|
  |*{100:~                                                 }|
  |*{100:~                                                 }|
  |*{3:[No Name]                                         }|
  |                                                  |
  |{5:-- TERMINAL --}                                    |
To print the expect() call that would assert the current screen state, use
screen:snapshot_util(). In case of non-deterministic failures, use
screen:redraw_debug() to show all intermediate screen states.
Snapshot:
screen:expect([[
                                                    |
  [Process exited 1]{100:^                                }|
  {100:~                                                 }|*2
  {3:[No Name]                                         }|
                                                    |
  {5:-- TERMINAL --}                                    |
]])
stack traceback:
	test/functional/ui/screen.lua:909: in function '_wait'
	test/functional/ui/screen.lua:537: in function 'expect'
	test/functional/terminal/tui_spec.lua:2523: in function <test/functional/terminal/tui_spec.lua:2521>

Solution:
Call tcdrain() on stdout and stderr on exit.

This problem is only observed on FreeBSD, but it probably doesn't hurt
to do this on all platforms with termios.h. In fact using tcdrain() on
PTY slave is no-op on Linux according to Linux kernel source code.
2026-03-05 10:48:07 +08:00
zeertzjq
843bc1aa8d vim-patch:9.2.0108: byteidx_common() and f_utf16idx() call ptr2len() twice (#38159)
Problem:  byteidx_common() and f_utf16idx() are calling ptr2len() twice
          per iteration, instead of reusing the already computed clen.
Solution: Reuse clen for pointer advancement in both functions
          (Yasuhiro Matsumoto).

closes: vim/vim#19573

499e93d09a

N/A patches:
vim-patch:9.2.0109: VIM_BACKTICK is always defined except for tiny builds

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-03-05 07:54:10 +08:00
bfredl
6535353b6d Merge pull request #38128 from bfredl/neodamage
refactor(marktree): use better structure for damaged pairs after splice
2026-03-04 09:04:32 +01:00
zeertzjq
a22c699ecb vim-patch:9.2.0106: memory leak in expand_findfunc()
Problem:  memory leak in expand_findfunc() (after v9.1.0811)
Solution: Free list variable l on early return (Huihui Huang).

closes: vim/vim#19564

648240fe9a

N/A patches:
vim-patch:9.2.0105: memory leak in heredoc_get() in src/evalvars.c

Co-authored-by: Huihui Huang <625173@qq.com>
2026-03-04 09:13:56 +08:00
zeertzjq
0676503ab5 vim-patch:9.2.0097: Memory leak in qf_push_dir()
Problem:  Memory leak in qf_push_dir() (after v9.2.0091)
Problem:  free dirname, if it is not a directory.

closes: vim/vim#19552

e352bb632a

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-03-04 09:09:50 +08:00
zeertzjq
0cfeedb088 vim-patch:9.2.0091: missing out-of-memory checks in quickfix.c
Problem:  missing out-of-memory checks in quickfix.c
Solution: Improve error handline, refactor qf_push_dir() slightly
          (John Marriott).

closes: vim/vim#19528

0155401538

Co-authored-by: John Marriott <basilisk@internode.on.net>
2026-03-04 09:07:29 +08:00
zeertzjq
6ddcc84a6c vim-patch:9.2.0102: 'listchars' "leadtab" not used in :list (#38142)
Problem:  'listchars' "leadtab" not used in :list (after 9.2.0088).
Solution: Also check for "leadtab" when using :list. Fix memory leak on
          E1572 if "multispace" or "leadmultispace" is set (zeertzjq).

closes: vim/vim#19557

5845741d69
2026-03-03 23:42:05 +00:00
Sean Dewar
1901832f26 fix(api): return "style" in nvim_win_get_config() #38122
Problem: nvim_win_get_config() does not return a window's "style".

Solution: always include it, and document `style=""`.

Always included so it can be used reciprocally with nvim_open_win() or
nvim_win_set_config(). (otherwise the config of a window with kWinStyleUnused
will not unset the kWinStyleMinimal style of another window if passed to
nvim_win_set_config, for example)
2026-03-03 12:17:20 +00:00
glepnir
84d84e9b5b fix(window): style=minimal window loses local options when switching buffers #38138
Problem: 5943a81 skips saving window options in `buflist_altfpos` for
style=minimal windows, which also prevents the window from restoring its own
options when switching buffers.

Solution: revert the change. In `get_winopts`, don't restore options from the
`WinInfo` of style=minimal windows when reusing values for a different window.
In `win_free`, clear `wi_optset` for minimal windows.
2026-03-03 11:51:58 +00:00
bfredl
00e51d2d1c refactor(marktree): use better structure for damaged pairs after splice
Previous implementation used a full sort but this is unnecessary. Pairs
do not need to be processed in id-order, all that we did was make
"start" and "end" marks find each other. This can be done with a hash
table instead. The "grow only" khash_t mentioned in the TODO is
the since long merged #24985 5970157e refactor with dense value array,
to not regress on memory locality.
2026-03-03 11:23:20 +01:00
zeertzjq
b23d00ce99 vim-patch:partial:9.2.0096: has() function is slow due to linear feature scan (#38135)
Problem:  The has() function is slow because it performs a linear scan
          of the feature list for every call.
Solution: Move common runtime checks and the patch-version parser to the
          beginning of the f_has() function (Yasuhiro Matsumoto).

closes: vim/vim#19550

327e0e34c9

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-03-03 09:57:21 +08:00
zeertzjq
f1c57b39fd vim-patch:73f4162: runtime(doc): Tweak doc style in options.txt
73f41626df

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2026-03-03 08:24:15 +08:00
zeertzjq
518aa46158 vim-patch:9.2.0090: "leadtab" behavior inconsistent on line with only TABs
Problem:  "leadtab" behavior inconsistent on line with only TABs
          (after 9.2.0088).
Solution: Don't consider those as leading TABs. Also add more tests for
          existing behavior of "lead" and "leadmultispace" (zeertzjq).

closes: vim/vim#19549

4b30e40a1f
2026-03-03 08:08:20 +08:00
zeertzjq
3e81072293 vim-patch:9.2.0088: cannot display tabs for indentation
Problem:  cannot display tabs for indentation
Solution: Add the "leadtab" value to the 'listchars' option to
          distinguish between tabs used for indentation and tabs used
          for alignment (HarshK97).

closes: vim/vim#19094

8526d32647

Co-authored-by: HarshK97 <harshkapse1234@gmail.com>
2026-03-03 08:05:58 +08:00
zeertzjq
ab8371a26c fix(tui): server --listen error sometimes not visible (#38027)
Problem:  If Nvim server fails to --listen and prints error before the
          TUI enters alternate screen, the error isn't visible.
Solution: Forward server stderr using client side stderr handler instead
          of having the server inherit client stderr file descriptor.

This does mean that `stderr_isatty` will be `false` in the server, but
that value doesn't matter in embedded mode.

Always pass `stdin_fd` to embedded server to avoid a hang when reading
from stdin when it's a TTY (not sure why one wants to do that, perhaps
by mistake), because if `stdin_fd` isn't passed, the server will try to
use stderr as stdin.

Example test failure on CI:

FAILED   test/functional/terminal/tui_spec.lua @ 41: TUI exit status 1 and error message with server --listen error #34365
test/functional/terminal\tui_spec.lua:55: Failed to match any screen lines.
Expected (anywhere): "nvim%.exe: Failed to %-%-listen: address already in use:"
Actual:
  |{114:nvim.exe -h"}                                                |
  |                                                            |
  |[Process exited 1]^                                          |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |                                                            |
  |{5:-- TERMINAL --}                                              |

Snapshot:
screen:expect([[
  {114:nvim.exe -h"}                                                |
                                                              |
  [Process exited 1]^                                          |
                                                              |*13
  {5:-- TERMINAL --}                                              |
]])

stack traceback:
	test\functional\ui\screen.lua:909: in function '_wait'
	test\functional\ui\screen.lua:537: in function 'expect'
	test/functional/terminal\tui_spec.lua:55: in function <test/functional/terminal\tui_spec.lua:41>

In this case, it appears that the client entered alternate screen in the
middle of the server's print_mainerr().
2026-03-02 20:39:05 +08:00
luukvbaal
563f9ef799 vim-patch:9.2.0081: Failed "z=" does not reset 'nospell' setting (#38109)
Problem:  When z= fails due to no word being found, 'spelllang' being
          unset or a multiline visual selection, 'nospell' is not
          restored.
Solution: Jump to where the user configured value of 'spell' is restored
          instead of returning early (Luuk van Baal).

closes: vim/vim#19525

eba078fc47
2026-03-01 09:21:48 +01:00
Sanzhar Kuandyk
b40ca5a01c fix(channel): support :detach, :restart on Windows #37977
fix: allocate hidden console for detached server

Starting the server with UV_PROCESS_DETACHED results in DETACHED_PROCESS, leaving the child without a console. Without a console:

CONIN$ / CONOUT$ cannot resolve, causing channel_from_stdio to fail.

ConPTY cannot attach, breaking :terminal.

This patch allocates a hidden console via AllocConsole() when the server has none, restoring working stdio and enabling ConPTY.

Also updates os_set_cloexec to clear HANDLE_FLAG_INHERIT on the RPC pipe
handles, matching the Unix F_DUPFD_CLOEXEC behavior.
2026-02-28 08:21:13 -05:00
glepnir
5943a81fe7 fix(float): style=minimal leaks into normal windows #25185
Problem: closing a minimal float saves its style-imposed options into
buffer's wininfo, which get picked up by normal windows on :bnext.

Solution: don't save window options to wininfo for style=minimal windows.
2026-02-28 13:20:56 +00:00
Rawan Khalid
9763834170 fix(cmake): use host nlua0 binary when cross-compiling #38089
Problem:
When cross-compiling, `$<TARGET_FILE:nlua0>` resolves to the target
binary, which cannot run on the host machine during the build process.

Solution:
Allow passing a host native nlua0 binary via
`-DNLUA0_HOST_PRG=/path/to/nlua0` when cross-compiling, so code
generation can run correctly on the host.
2026-02-28 07:17:46 -05:00
Yochem van Rosmalen
74d1af165a revert :gen_help_html.lua commit 4a4de73 #38100
revert commit 4a4de73043
2026-02-28 06:34:01 -05:00
zeertzjq
7e8bdd348c vim-patch:9.2.0077: [security]: Crash when recovering a corrupted swap file (#38104)
Problem:  memline: a crafted swap files with bogus pe_page_count/pe_bnum
          values could cause a multi-GB allocation via mf_get(), and
          invalid pe_old_lnum/pe_line_count values could cause a SEGV
          when passed to readfile() (ehdgks0627, un3xploitable)
Solution: Add bounds checks on pe_page_count and pe_bnum against
          mf_blocknr_max before descending into the block tree, and
          validate pe_old_lnum >= 1 and pe_line_count > 0 before calling
          readfile().

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-r2gw-2x48-jj5p

65c1a143c3

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-02-28 04:33:47 +00:00
zeertzjq
a416494e64 vim-patch:9.2.0078: [security]: stack-buffer-overflow in build_stl_str_hl() (#38102)
Problem:  A stack-buffer-overflow occurs when rendering a statusline
          with a multi-byte fill character on a very wide terminal.
          The size check in build_stl_str_hl() uses the cell width
          rather than the byte length, allowing the subsequent fill
          loop to write beyond the 4096-byte MAXPATHL buffer
          (ehdgks0627, un3xploitable).
Solution: Update the size check to account for the byte length of
          the fill character (using MB_CHAR2LEN).

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-gmqx-prf2-8mwf

4e5b9e31cb

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-02-28 09:22:41 +08:00
zeertzjq
453dfbf7d6 vim-patch:9.1.0535: newline escape wrong in ex mode
Problem:  newline escape wrong in ex mode (Konrad Schwarz)
Solution: partly revert patch 7.3.014, remove backslash in front of a
          newline when not in prompt mode in ex line mode
          (Mohamed Akram)

This fixes newline escaping to allow passing multiple commands to
":global", multiple lines to shell commands, and ending lines in append
mode with backslashes. This should fix a POSIX/(traditional) VI
incompatiblity.

This reverts a previous incorrect attempt at patch v7.3.014 to fix
append mode which removed half of trailing backslashes which lead to,
eg. the following two commands being parsed as having a different number
of backslashes:

```
!echo foo\\\
```

```
!echo foo\\ \
```

fixes: vim/vim#6135
fixes: vim/vim#7244
closes: vim/vim#15120

f3daa4525b

Co-authored-by: Mohamed Akram <mohd.akram@outlook.com>
2026-02-28 07:04:08 +08:00
Yochem van Rosmalen
4a4de73043 fix(help): better align local-additions #38097
Problem:
Descriptions of plugins often contain taglinks which are generally
concealed. This misaligns them by 2 characters with descriptions that
don't have a taglink in them.

Solution:
Don't count "bar" characters (`|`) for the description width.

Example:

Actual buffer content:
```
myplugin.txt                  |lsp| is cool
myplugin.txt        this is a nice plugin
```

Rendered as:
```
myplugin.txt                  lsp is cool
myplugin.txt        this is a nice plugin
```
2026-02-27 17:50:51 -05:00
bfredl
044300b72c Merge pull request #38074 from bfredl/mapfix
fix(map): use names like Map_key_value not Map_keyvalue
2026-02-27 13:58:04 +01:00
Riccardo Mazzarini
2368a9edbd feat(terminal): support SGR dim, overline attributes #37997
Problem:
libvterm doesn't support parsing the dim and overline attributes, so when a program running in the embedded terminal emits one of these escape codes, we ignore it and don't surface it to the outer terminal.

Solution: tweak libvterm to add support for both attributes.
2026-02-27 11:46:22 +00:00
bfredl
84d3bbef23 fix(map): use names like Map_key_value not Map_keyvalue
This makes little difference in practice except for extremely unlikely
ambiguities. But it looks nicer in compiler errors and stacktraces where
you see the fully expanded names
2026-02-27 11:47:07 +01:00
Kyle
5cbb9d613b fix(startup): wait for bg detection before user config #37075
Problem:
Automatic background detection sets the background option too late,
which loads colorschemes twice and causes problems when the user's
terminal background doesn't match the default (#32109, #36211, #36416).

Solution:
Use a DA1 query to determine whether the TTY supports OSC 11. Wait for
background detection and setting to complete before processing user
config.

Note: To preserve the existing behavior as much as possible, this triggers
OptionSet manually on VimEnter (since it won't trigger automatically if
we set bg during startup). However, I'm unsure if this behavior is
truly desired given that the documentation says OptionSet is triggered
"After setting an option (except during |startup|)."

Also fixes flickering issue #28667. To check for flickering:

    nvim --clean --cmd "set termguicolors" --cmd "echo \"foo\"" --cmd "sleep 10"

On master, this gives me a black screen for 10 seconds, but on this
branch, the background is dark or light depending on the terminal
background (since the option is now set during startup rather than after
VimEnter).
2026-02-27 04:52:52 -05:00
glepnir
f45c550f4e fix(restart): drop "-s <scriptfile>" from v:argv on :restart #38058
Problem: When nvim is started with "-s -" (read from stdin), ":restart"
drops the "-" argument but keeps "-s", leaving an orphaned "-s" in the
restarted server's argv, causing a crash.

Solution: Drop "-s" and its scriptfile argument when copying v:argv for
the restarted server. Like "-- [files…]", the scriptfile is a one-shot
startup input that should not be replayed on restart
2026-02-27 04:30:45 -05:00
zeertzjq
18c5f06c9f vim-patch:partial:9.2.0068: Inefficient use of list_append_string() (#38083)
Problem:  Inefficient use of list_append_string()
Solution: Pass string length to list_append_string() where it is known
          (John Marriott).

closes: vim/vim#19491

455d62e38a

N/A patches:
vim-patch:9.2.0063: memory leak in type_name_list_or_dict()
vim-patch:9.2.0065: memory leak in invoke_sync_listeners()
vim-patch:9.2.0066: memory leak in build_drop_cmd()
vim-patch:9.2.0067: memory leak in dict_extend_func()

Co-authored-by: John Marriott <basilisk@internode.on.net>
2026-02-27 07:32:08 +08:00
zeertzjq
7852993f49 vim-patch:9.2.0061: Not possible to know when a session will be loaded (#38071)
Problem:  Not possible to know when a session will be loaded.
Solution: Add the SessionLoadPre autocommand (Colin Kennedy).

fixes:  vim/vim#19084
closes: vim/vim#19306

1c0d468d72

Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
2026-02-26 21:30:44 +08:00
luukvbaal
e63346dfe9 fix(messages): reset redirection message column at message start #38068
Problem:  Leading message newlines (not emitted with ext_messages since
          4260f73) were responsible for resetting the redirection message
          column (while the newline itself is later pruned...).
Solution: Ensure the redirection column is reset at the start of a message.
          (Instead of re-adjusting all the newline callsites which can
          themselves hopefully be pruned if ext_messages is enabled by
          default.)
2026-02-26 07:45:33 -05:00
bfredl
37c0efb21c fix(marktree): fix edge case bug regarding changing intersections
fix #37867

This bug happens when only one end is moved between different nodes,
but the other end is also moved but within the same node.
When this happens we need the correct previous position even for the
internal move. This code shall be refactored to make the intent clearer,
(and avoid some unnecessary processing) but this is a fix for the observable
bug.

Thanks to KevinGoodsell for providing a deterministic
reproduce using fuzzing techniques.
2026-02-26 10:30:41 +01:00
bfredl
3a4a7a7efb Merge pull request #37722 from bfredl/fastpackadd
perf(runtime): hardware accelerated "packadd opt_package"
2026-02-26 10:29:49 +01:00
github-actions[bot]
be8969f4cc docs: update version.c (#38053)
vim-patch:9.2.0001: tests: Test_popup_setbuf() fails
vim-patch:9.2.0047: Vim9: Comment parsing error with lambda
vim-patch:9.2.0052: Wayland: hiding lower half of command line in tiny vim

Co-authored-by: marvim <marvim@users.noreply.github.com>
2026-02-26 12:02:20 +08:00
zeertzjq
1fe1b2525f vim-patch:9.2.0054: eval_addblob() is inefficient (#38067)
Problem:  eval_addblob() is inefficient
Solution: Replace per-byte ga_append() loop with a single ga_grow() and
          mch_memmove() for each source blob.  This eliminates N grow
          checks and function call overhead for blob concatenation
          (Yasuhiro Matsumoto).

closes: vim/vim#19494

c389ae8c44

Omit the pointless int -> long changes in other functions.

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-02-26 08:15:57 +08:00
zeertzjq
9288357d59 vim-patch:9.2.0055: memory leak in ExpandFromContext() (#38066)
Problem:  memory leak in ExpandFromContext()
Solution: Free the variable (Huihui Huang).

fixes:  vim/vim#19500
closes: vim/vim#19505

9c3279ddc3

N/A patches:
vim-patch:9.2.0056: memory leak in ex_substitute
vim-patch:9.2.0057: memory leak in exe_newdict()
vim-patch:9.2.0058: Compile error in did_set_previewpopup()
vim-patch:9.2.0059: memory leak in fill_assert_error

Co-authored-by: Huihui Huang <625173@qq.com>
2026-02-26 00:04:34 +00:00
Christian Clason
44429b4d96 build(deps): bump wasmtime to v36.0.6 2026-02-25 18:32:39 +01:00
bfredl
3aa04f7ee4 perf(runtime): hardware accelerated "packadd opt_package"
fixes #37586

when doing `packadd mypackage` up to two exact paths are added
to &rtp. Instead of recalculating runtime_search_path from scratch,
we can "just" splice these two paths in

This is simple in theory, but get complicated in practice as
"after" dirs do exist and need some wrangling.

Echasnovski did some benchmarking, to show that this reduces overhead
of a init.lua configuration style where separate `packadd!` calls are
used spread out during the config. In addition, "batched" addition
(either using "start" packages or packadd! a lot of opt packages at
once) does not regress.

A theoretical simplification could be to NEVER explicitly add "after"
dirs to &rtp, but implicitly add all existing "after" dirs in reverse
order when calculating the effective run time path. This might be tricky
to do without breaking 12 tpope plugins again tho.

We might also instead consider solutions where &rtp remains fully expanded but no longer is the main source of truth. But this is all post 0.12 work. This PR is an alright stopgap to make 0.12 fully support intended use cases of vim.pack.add() .
2026-02-25 09:39:54 +01:00
Sanzhar Kuandyk
cf874cee33 feat(startup): provide v:argf for file arguments #35889
Problem:
- `:args` and `argv()` can change after startup.
- `v:arg` includes options/commands, not just files.
- Plugins (e.g. Oil) may rewrite directory args.

Solution:
- New read-only var `v:argf`: snapshot of file/dir args at startup.
- Unaffected by `:args` or plugins.
- Unlike `v:argv`, excludes options/commands.
- Paths are resolved to absolute paths when possible

Example:

    nvim file1.txt dir1 file2.txt
    :echo v:argf
    " ['/home/user/project/file1.txt', '/home/user/project/dir1', '/home/user/project/file2.txt']
2026-02-25 03:38:08 -05:00
luukvbaal
39c4e0f336 fix(messages): unwanted ext_messages newlines for confirm() #38045
Problem:  Newlines emitted with ext_messages intended to position
          the message/prompt on the message grid.
Solution: Don't emit these newlines with ext_messages, followup to 4260f73e.
2026-02-24 13:01:31 -05:00