Commit Graph

33883 Commits

Author SHA1 Message Date
Yochem van Rosmalen
566e8c66f9 docs: optionlinks don't need the bars #35777
Problem:
Options links work even without vertical bars around them due to their
single quotes: the bars are unnecessary.

Solution:
Remove them.
2025-09-15 12:36:44 -07:00
bfredl
f1a8bb45ca Merge pull request #35387 from bfredl/zigci
build(ci): run more zig builds on ci
2025-09-15 14:09:10 +02:00
bfredl
0458a1e694 build(ci): bump zig to 0.15.1 and add more platforms
- Bump zig version to 0.15.1 and workaround zig fetch hang (ziglang/zig#24916)
- add mac os zig build (currently without luajit, linker failure)
- Add windows zig build, currently with very limited testing
2025-09-15 12:10:23 +02:00
zeertzjq
2debe2f30a fix(lsp): avoid automatic request after leaving insert mode (#35767)
This also fixes the following warning in tests with ASAN or TSAN:

    -------- Running tests from test/functional/plugin/lsp/inline_completion_spec.lua
    RUN      T4604 vim.lsp.inline_completion enable() requests or abort when entered/left insert mode: 225.00 ms OK
    RUN      T4605 vim.lsp.inline_completion get() applies the current candidate: 212.00 ms OK
    nvim took 2013 milliseconds to exit after last test
    This indicates a likely problem with the test even if it passed!

    RUN      T4606 vim.lsp.inline_completion get() accepts on_accept callback: 212.00 ms OK
    RUN      T4607 vim.lsp.inline_completion select() selects the next candidate: 220.00 ms OK
    -------- 4 tests from test/functional/plugin/lsp/inline_completion_spec.lua (3437.00 ms total)

    -------- Running tests from test/functional/plugin/lsp/linked_editing_range_spec.lua
    nvim took 2011 milliseconds to exit after last test
    This indicates a likely problem with the test even if it passed!
2025-09-15 14:41:29 +08:00
Justin M. Keyes
8e922c657c build: allow comments in deps.txt #35765
Problem:
It was not obvious where our source for "busted" is.

Solution:
Add a comment to `deps.txt`.
2025-09-14 22:30:10 -07:00
zeertzjq
1264d1156c fix(lua): don't leak timer when vim._watch.watch() fails (#35768)
This fixes the following warning in tests with ASAN or TSAN:

    -------- Running tests from test/functional/lua/watch_spec.lua
    RUN      T4253 vim._watch watch() ignores nonexistent paths: 29.00 ms OK
    nvim took 2006 milliseconds to exit after last test
    This indicates a likely problem with the test even if it passed!
2025-09-15 11:15:25 +08:00
zeertzjq
e2ab5e1db7 vim-patch:81ca991: runtime(html): guard against an existing b:undo_ftplugin var (#35763)
Filetype plugins should not assume they are the only file to execute on
behalf of a buffer's filetype: other filetypes may use them, and
dotted filetypes may cause multiple to run. When this occurs, they
should _build_ on their respective b:undo_ftplugin settings, not
overwrite each other.

For example, when using a dotted filetype wiki.markdown, the wiki
filetype plugins go first. Then, during the markdown filetype plugins,
the HTML plugin's unconditional assignment to b:undo_ftplugin trashes
any data previously stored there by the wiki filetype.

Follow the pattern elsewhere of assigning or appending conditionally.

closes: vim/vim#18267

81ca9916d2

Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
2025-09-15 08:27:55 +08:00
zeertzjq
3f1b12c886 vim-patch:c37f25c: runtime(doc): update Markdown syntax documentation and mention Pandoc (#35762)
fixes: vim/vim#18286

c37f25c651

Co-authored-by: Mao-Yining <mao.yining@outlook.com>
2025-09-15 08:16:41 +08:00
zeertzjq
ca9cc98298 vim-patch:partial:235e77a: runtime(doc): Tweak documentation style more in options and ft_hare (#35761)
closes: 18289

235e77a3a3

Skip ft_hare.txt.

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-09-15 08:00:43 +08:00
zeertzjq
7b8b9d270f vim-patch:9.1.1758: Diff mode crashes when adding text property in autocommand (#35760)
Problem:  Diff mode crashes when adding text property in autocommand
          (after 9.1.1557).
Solution: Only restore ML_EMPTY memline flag, ignore the others
          (zeertzjq).

fixes: vim/vim#18288
closes: vim/vim#18291

46e22fd2f7
2025-09-15 07:17:37 +08:00
zeertzjq
fbb1caf5f8 vim-patch:97e0f95: runtime(doc): tweak documentation style a bit more in options.txt (#35755)
related: vim/vim#18284

97e0f955da
2025-09-14 16:45:18 +08:00
skewb1k
a897cc17a5 feat(json): vim.json.encode() sort_keys #35574
Problem: There is no way to ensure a stable key order when encoding a JSON string,
which can be useful for comparisons and producing cleaner diffs.

Solution: Introduce a `sort_keys` option for `vim.json.encode()`,which
is disabled by default. When enabled, object keys are sorted in
alphabetical order.
2025-09-13 21:17:07 -07:00
Justin M. Keyes
05a511996f Merge #35655 docs 2025-09-13 23:54:10 -04:00
Justin M. Keyes
a30a947593 docs: move editorconfig.txt into plugins.txt
It helps to have plugins living in one common area, because it signals
to users the mechanisms for controlling them, which are typically driven
by keymaps and autocmds rather than builtin options.

We can always revisit if plugins.txt gets "too big" (for example, we may
want to introduce "project.txt" for the project concept, where
editorconfig and 'exrc' are relevant), but for now it's rather unusual
for editorconfig.txt to have its own dedicated helpfile.
2025-09-13 23:23:24 -04:00
Justin M. Keyes
db67607201 docs: manpage, keycodes, json 2025-09-13 22:49:50 -04:00
Justin M. Keyes
2f78ff816b fix(lsp): misleading logs in non-applicable filetypes #35749
Problem:
LSP logs show misleading "cannot start" messages when editing a filetype
NOT listed in the `config.filetypes` field.

    [ERROR][2025-09-13 18:55:56] …/runtime//lua/vim/lsp/log.lua:151
    "cannot start cssls due to config error: …/runtime//lua/vim/lsp.lua:423:
    cmd: expected expected function or table with executable command,
    got table: 0x0104701b18. Info: vscode-css-language-server is not executable"

Solution:
- `can_start`: check `config.filetypes` before checking the rest of the
  config.
2025-09-13 18:51:06 -07:00
zeertzjq
5ef567d130 build(gen_helptags): update check for example (#35750)
Follow-up to ae588c183f.
2025-09-14 08:38:06 +08:00
zeertzjq
68f40386ed vim-patch:partial:450d591: runtime(doc): tweak documentation style (#35748)
closes: vim/vim#18284

450d59145e

Skip ft_hare.txt.

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-09-13 23:33:06 +00:00
fredizzimo
8ae9a44d38 feat(ui): support grid=0 in nvim_input_mouse #32535
Problem:
Multigrid UIs have to find out which window to send the input by using
the Nvim focus rules, which are not fully documented.

Furthermore,`getmousepos()` has several problems when multigrid is
enabled, with the main one being that screenrow and screencol are window
relative instead of screen relative, due to the fact that the UI don't
send any absolute coordinates.

Solution:
Allow passing 0 as grid to `nvim_input_mouse`, with absolute
coordinates, which lets nvim determine the actual window to send the
mouse input to. This works as long as nvim is in charge of the window
positioning. If the UI repositions or resizes the windows, it can still
pass the grid it determines like before.
2025-09-13 14:57:04 -07:00
luukvbaal
c1648cf820 fix(ui): forward 'rulerformat' to msg_ruler event #35707
Problem:  A 'rulerformat' not part of the statusline is not emitted through
          msg_ruler events.
Solution: Build the message chunks to emit as a msg_ruler event.
2025-09-13 13:34:58 -07:00
Evgeni Chasnovski
a41703d107 feat(pack): confirm "Always" to install all plugins #35733
Problem: First clean start with config containing multiple
  `vim.pack.add()` calls requires to explicitly confirm each one.
  Although usually a rare occurrence, it still might be tedious.

Solution: Add a third choice during installation confirmation that
  approves current and all next installs within current session. It is
  reset after session restart.
2025-09-13 13:32:09 -07:00
github-actions[bot]
ec89c5b261 docs: update version.c #35670
vim-patch:8.1.0000: release
vim-patch:8.1.0058: display problem with margins and scrolling
vim-patch:8.1.0065: balloon displayed at the wrong position
vim-patch:8.1.0158: GUI: input() fails if CTRL-C was pressed before
vim-patch:8.1.0328: inputlist() doesn't work with a timer

vim-patch:8.1.1560: popup window hidden option not implemented yet
vim-patch:8.1.1600: cannot specify highlighting for popup window scrollbar
vim-patch:8.1.1810: popup_getoptions() is missing an entry for "mapping"
vim-patch:8.1.1811: popup window color cannot be set to "Normal"
vim-patch:8.1.1943: more code can be moved to evalvars.c
vim-patch:8.1.2265: when popup with "botleft" does not fit it flips incorrectly
vim-patch:8.1.2266: position unknown for a mouse click in a popup window

vim-patch:8.2.1190: Vim9: checking for Vim9 syntax is spread out
vim-patch:8.2.1405: Vim9: vim9compile.c is getting too big
vim-patch:8.2.2227: Vim9: recognizing lambda is too complicated
vim-patch:8.2.4036: Vim9: script test file is getting too long
vim-patch:8.2.4159: MS-Windows: _WndProc() is very long
vim-patch:8.2.4189: MS-Windows: code for "old look" is obsolete
vim-patch:8.2.4194: MS-Windows: code for calculating font size is duplicated
vim-patch:8.2.4198: Vim9: the switch for executing instructions is too long
vim-patch:8.2.4213: too much code for supporting old MSVC versions
vim-patch:8.2.4294: MS-Windows: #ifdefs for Cygwin are too complicated

vim-patch:9.0.1757: ex_class() function is too long

vim-patch:9.1.0361: Vim9: vim9type.c is too complicated
vim-patch:9.1.0367: compile_def_function is too long
vim-patch:9.1.0371: Vim9: compile_def_function() still too long
vim-patch:9.1.0517: MS-Windows: too long lines in Make_mvc.mak
vim-patch:9.1.0914: Vim9: compile_assignment() is too long
vim-patch:9.1.0920: Vim9: compile_assignment() too long
vim-patch:9.1.1278: Vim9: too long functions in vim9type.c
vim-patch:9.1.1092: tests: fix expected return code for python 3.13 on Windows
2025-09-13 13:06:40 -07:00
zeertzjq
4a69847df4 fix(tui): don't wait for DA1 response when stdin is closed (#35745) 2025-09-13 20:53:17 +08:00
Jan Edmund Lazo
f89e1eb036 vim-patch:8.1.1964: crash when using nested map() and filter() (#35715)
Problem:    Crash when using nested map() and filter().
Solution:   Do not set the v:key type to string without clearing the pointer.

c36350bca3

Port filter_map() changes from patch 8.1.1939.

Note: v8.1.1964 reverts a redundant change for `filter_map()` (now
within `filter_map_dict()`) from v8.1.1957.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-09-13 13:31:29 +08:00
zeertzjq
4c2b7ddcdd Merge pull request #35736 from tomtomjhj/vim-2328a39
vim-patch: netrw plugin updates
2025-09-13 12:54:21 +08:00
Jaehwang Jung
9ce21c9cf5 vim-patch:9e100b8: runtime(netrw): only keep cursor position in tree listing mode
fixes: vim/vim#16255
closes: vim/vim#18275

9e100b8d14

Co-authored-by: Tom Benham <tom.benham13@gmail.com>
2025-09-13 13:23:36 +09:00
Jaehwang Jung
886fcad894 vim-patch:5f83674: runtime(netrw): Ensure netrw#fs#Dirname() always returns a trailing slash
closes: vim/vim#18199

5f836749fa

Co-authored-by: Miguel Barro <miguel.barro@live.com>
2025-09-13 13:23:14 +09:00
Jaehwang Jung
c318da73b4 vim-patch:5346688: runtime(netrw): fix :Explore command in terminal
There are really two issues solved here:

- The directory listing was not populating the new buffer when using
  the :Explore command. This was because the directory to open is
  determined by using expand("%:p") which includes '!/running/command' at
  the end of the string in terminal buffers.

- The :Explore command should replace the buffer, not split it. This
  because the Explore command will automatically split if the current
  buffer has been modified. According to the docs, all terminal buffers
  will have the modified flag set when a job is running.

fixes: vim/vim#9862
closes: vim/vim#18069

53466887f7

Co-authored-by: Jason Long <jasonlongball@gmail.com>
2025-09-13 13:22:47 +09:00
Jaehwang Jung
2997031732 vim-patch:6a6a44f: runtime(netrw): netrw#BrowseX() needs to distinguish local and remote file
fixes: vim/vim#17794

6a6a44ffb5

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-13 13:22:08 +09:00
Jaehwang Jung
130c841287 vim-patch:c849b17: runtime(netrw): Use correct "=~#" for the netrw_sizestyle='H' option
Correct expression syntax to match case in if and if-else clauses.

related: vim/vim#8535
closes: vim/vim#17901

c849b17e19

Co-authored-by: veotos <veotos@users.noreply.github.com>
2025-09-13 13:22:08 +09:00
Jaehwang Jung
cad62f5ec6 vim-patch:0bda783: runtime(netrw): upstream snapshot v184
This change includes the following upstream commits:

- fix: remove black lines in directory listing
- fix: correctly create new file when using Lexplore
- refactor: remove print functionality

The main highlight is removing print functionality that was broken both
in neovim and vim.

closes: vim/vim#17847

0bda7830ac

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:19:40 +09:00
Jaehwang Jung
68c9577519 vim-patch:b3eaae2: runtime(netrw): restore blank line cleanup after file listing
Problem:  v182 refactoring removed blank line cleanup (g/^$/d) from
          s:LocalListing(), causing empty lines between directories
          and files.
Solution: Add the missing cleanup after append() in s:PerformListing()
          (uma-chan).

closes: vim/vim#17672

b3eaae21b9

Co-authored-by: uma-chan <127664533+i9wa4@users.noreply.github.com>
Co-authored-by: Luca Saccarola <96259932+saccarosium@users.noreply.github.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
8537133f82 vim-patch:ef92555: runtime(netrw): upstream snapshot of v182
relevant commits:
- refactor: cleanup netrw#BrowseX
- fix: correctly handle symlinks in treeview
- chore: add minimalrc for reproducing issues
- refactor: simplify s:NetrwInit with the 'newer' assignment syntax
- refactor: remove balloon functionality
- Tune local file listing especially for Windows network drives
- interim fix for browse open with multiple windows

closes: vim/vim#17616

ef925556cb

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
b643e1f3d5 vim-patch:2249cc0: runtime(netrw): remove the fun from netrw :)
closes: vim/vim#17584

2249cc0a47

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
7b2a42e962 vim-patch:7e47c1e: runtime(netrw): remove g:netrw_quiet and reindent to 4 spaces
closes: vim/vim#17539

7e47c1e735

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
4644e69bdc vim-patch:f5e3b5c: runtime(netrw): refactor netrw#ErrorMsg -> netrw#msg#Notify
closes: vim/vim#17526

f5e3b5c04f

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
1e2b75abb7 vim-patch:600cd88: runtime(netrw): remove comment separators
closes: vim/vim#17514

600cd88cdf

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
db423ccf27 vim-patch:1319009: runtime(netrw): get rid of s:Strlen() and use strdisplaywidth()
closes: vim/vim#17498

1319009d59

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
2a3d985ce4 vim-patch:09a62e6: runtime(netrw): cleanup Decho related comments
closes: vim/vim#17465

09a62e6f64

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
be4c05a485 vim-patch:d1a975a: runtime(netrw): upstream snapshot of v181
closes: vim/vim#17461

d1a975ae64

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
4d8b2be77e vim-patch:839fd94: runtime(netrw): remove deprecated functions
closes: vim/vim#17124

839fd94265

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang Jung
fb9457c23b vim-patch:d623773: runtime(netrw): upstream snapshot of v180
relevant commits:
- fix(gvim): don't set previous jump
- don't overwrite copy, copydir, mkdir and move command options
- fix: correctly name deprecate function
- refactor: remove s:NetrwBufRemover
- refactor: s:NetrwDelete -> netrw#fs#Remove
- defaults!: remove g:netrw_use_errorwindow

fixes: vim/vim#17114
closes: vim/vim#17123

d62377386c

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:19 +09:00
Jaehwang Jung
02a33a449e vim-patch:29d596c: runtime(netrw): upstream snapshot of v179
closes: vim/vim#16787

29d596c80a

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:15:48 +09:00
Jaehwang Jung
a6412b3d53 vim-patch:da53af5: runtime(netrw): correctly handle shellslash variable
closes: vim/vim#16758

da53af57a7

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:15:48 +09:00
Jaehwang Jung
192839a328 vim-patch:5b97947: runtime(netrw): runtime(netrw): upstream snapshot of v178
relevant commits:
- refactor: netrw#own#Deprecate -> netrw#msg#Deprecate
- refactor: netrw#own#PathJoin -> netrw#fs#PathJoin
- fix: typos
- refactor: netrw#own#Open -> netrw#os#Open
- deprecate!: netrw#WinPath
- refactor: netrw#WinPath -> netrw#fs module
- refactor: s:ShellEscape -> netrw#os module
- refactor: s:NetrwExe -> netrw#os module
- refactor: s:NetrwGlob -> netrw#fs module
- refactor: s:NetrwGetcwd -> netrw#fs module
- refactor: s:NetrwFullPath -> netrw#fs module
- refactor: s:ComposePath -> netrw#fs module

closes: vim/vim#16718

5b97947bbd

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:15:48 +09:00
Jaehwang Jung
66c81010fd vim-patch:ee1a24b: runtime(netrw): fix s:NetrwHome() regression
If $MYVIMDIR is unset netrw creates a directory called '$MYVIMDIR' in
the current directory

fixes: vim/vim#16609

ee1a24b21d

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:15:48 +09:00
Jaehwang Jung
dcb5e7c88f vim-patch:73d8222: runtime(netrw): upstream snapshot of v177
relevant commits:
- defaults!: use 'suffixes' for 'g:netrw_sort_sequence'
- refactor: remove associated buffer when deliting a file
- refactor: s:NetrwLocalRm
- refactor: s:NetrwDelete
- refactor: s:NetrwLocalRmFile
- feat: use vim.notify on neovim
- fix: prefer v:lua instead of luaeval for vim.deprecate
- chore: remove old batteries

closes: vim/vim#16638

73d8222b31

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:15:48 +09:00
Jaehwang Jung
98e51d2e0d vim-patch:6d6ec2e: runtime(netrw): correct wrong version check
The version check introduced with commit edd4ac3e8 has a logic error.
Also it should only trigger when trying to use the netrw plugin and not
always.

fixes: vim/vim#16541

6d6ec2ee05

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-13 13:15:48 +09:00
Jaehwang Jung
90018d2b36 vim-patch:ec961b0: runtime(netrw): upstream snapshot of v176
relevant commits:
- deprecate!: netrw#Launch, netrw#Open and gx mappings
- refactor: move some utility functions in a private file
- feat: add function to deprecate features
- refactor!: remove NetrwClean command and function
- refactor: use appropriate directories to store temporary files
- refactor: better way to call vim.ui.open
- refactor(Open): prefer lua wrapper function instead of cmdline
- refactor!: drop vim 7 checks
- refactor: use vim.ui.open when using neovim
- refactor: remove s:CheckIfKde
- refactor: balloon functionality
- refactor!: remove netrw#Access function

closes: vim/vim#16519

ec961b05dc

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:15:48 +09:00
Jaehwang Jung
bf7d20bb1d vim-patch:2328a39: runtime(netrw): do not double escape Vim special characters
This double escaping was likely introduced because it was the only way
to make :Open work with hashes/percent signs despite shellescape(..., 1)
supposedly taking care of it, but then breaks the gx mapping
on MSYS2 as reported at [0]

Since special characters in the URL following :Open can be escaped,
whereas gx simply breaks and is more common, no longer double escape

[0]: https://github.com/vim/vim/issues/16252

fixes: vim/vim#16252
closes: vim/vim#16265

2328a39a54

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-09-13 13:15:48 +09:00