Commit Graph
180 Commits
Author SHA1 Message Date
zeertzjq 7088441de4 vim-patch:58ab343: runtime(netrw): fix misaligned comment after vim/vim#18611 (#36362)
related" vim/vim#18611
closes: vim/vim#18644

https://github.com/vim/vim/commit/58ab3438b7b4e1828efa2f86a5f37af5a7dbf259
2025-10-28 00:12:21 +00:00
zeertzjqandVáclav Kobera 070f4d3da0 vim-patch:9.1.1875: username parsing bug in netrw plugin (#36348)
Problem:  username parsing bug in netrw plugin when using remote adding
          feature
Solution: Allow any characters except for "@" (Václav Kobera), add a
          test for the netrw plugin

closes: vim/vim#18611

https://github.com/vim/vim/commit/f17f78c557c4a437cd06bc7a69ed345176c157fd

Co-authored-by: Václav Kobera <vasekobera@gmail.com>
2025-10-27 03:20:34 +00:00
An Guoli 671841673e vim-patch:ce4f9d2: runtime(nohlsearch): fix CursorHold loop (#36221)
fix exception when entering the insert mode with paste

closes: vim/vim#16818

https://github.com/vim/vim/commit/ce4f9d2a1016ade19fa07c5b66e58eb084719192
2025-10-18 09:28:58 +08:00
Maria Solano 382963891c fix(undotree): check foldmethod before invoking fold (#36192) 2025-10-14 21:59:25 -07:00
Tomas Slusny d590644620 fix(difftool): silence :only command in setup_layout #36168
Suppresses output from the :only command by passing the { silent = true }
modifier to vim.cmd.only(). This prevents unnecessary messages when
setting up the diff layout.

Closes #36167
2025-10-13 17:04:48 -07:00
Tomas Slusny aaec3e5b0d fix(difftool): add check for window number when cleaning up layout #36161
- Move autocmd cleanup logic back to setup_layout as WinClosed autocmds
  were triggering for every closed window even when buf scoped, and when
  buf scoped, pattern filter did not work.
- Cleanup when quickfix window is closed as well to prevent state where
  on closing quickfix setup_layout will reset it after with empty
  content because of WinClosed autocmds triggering.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2025-10-13 11:12:42 -07:00
Tomas Slusny c6113da5a9 fix(difftool): fully resolve symlinks when comparing paths #36147
Fixes issue on mac where it was constantly reloading buffers as paths
were not being normalized and resolved correctly (in relation to buffer
name).

Quickfix entry:
/var/folders/pt/2s7dzyw12v36tsslrghfgpkr0000gn/T/git-difftool.m95lj8/right/app.vue

Buffer name:
/private/var/folders/pt/2s7dzyw12v36tsslrghfgpkr0000gn/T/git-difftool.m95lj8/right/app.vue

/var was synlinked to /private/var and this was not being properly
handled.

Also added lazy redraw to avoid too many redraws when this happens in
future and added test for symlink handling.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2025-10-12 18:25:14 +00:00
Tomas Slusny c9b74f8b7e fix(difftool): ensure split layout, use systemlist #36145
- Always open the right window to the right, regardless of 'splitright'
  setting, ensuring the left window is always leftmost.
- Use `vim.fn.systemlist` for diffr output to avoid manual splitting.
- Add a test to verify window layout consistency with 'splitright' and
  'nosplitright' options.
- Escape quotes in git difftool example properly.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
2025-10-12 05:11:27 +00:00
fec02ae8e4 feat(plugins): nvim.difftool can compare directories #35448
Problem:
Built-in diff mode (nvim -d) does not support directory diffing
as required by git difftool -d. This makes it difficult to compare
entire directories, detect renames, and navigate changes efficiently.

Solution:
Add a DiffTool plugin and command that enables side-by-side diffing of
files and directories in Neovim. The plugin supports rename detection,
highlights changes in the quickfix list, and provides a user command for
easy invocation. This allows proper integration with git difftool -d for
directory comparison.

Example git config:

```ini
[diff]
    tool = nvim_difftool

[difftool "nvim_difftool"]
    cmd = nvim -c "packadd nvim.difftool" -c "DiffTool $LOCAL $REMOTE"
```

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
Co-authored-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-10-11 19:24:39 -07:00
Yochem van Rosmalen 26bd9bfab8 fix(undotree): highlight extmarks like normal text #36087
Problem:
Difference in highlight color between normal lines and extmark lines is
distracting and conveys little information.

Solution:
Set extmarks highlight to the Normal group.
2025-10-11 13:39:51 -07:00
phanium f40672be99 fix(undotree): clear autocmd correctly #36124
Problem: nvim_clear_autocmds clear some other autocmd unexpectedly

Solution: clear it correctly
2025-10-10 21:09:51 -07:00
phanium 9c89212de1 fix(undotree): sync scroll pos with undo #36117
Problem: when undo in buffer, undotree window is not updated to
position of correct node

Solution: schedule nvim_win_set_cursor
2025-10-10 07:07:01 -07:00
Mike J McGuirk 4598305e0b fix(undotree): mark title field annotation as optional (#36102)
* fix(undotree): mark title field annotation as optional

* fix(doc): run make doc for undotree annotation change
2025-10-09 10:49:49 -04:00
Tristan Kapous 645206e87f fix(undotree): error on undotree.open() with title as string #36085 2025-10-08 19:49:21 -07:00
Mike J McGuirk 81d2d88f70 feat(undotree): set 'filetype' #36091 2025-10-09 02:34:44 +00:00
altermo 9e1d3f4870 feat(runtime): undotree #35627
Problem
No builtin way to visualize and navigate the undo-tree.

Solution
Include an "opt" plugin.
2025-10-07 14:32:22 -07:00
zeertzjqandMiguel Barro d72c805e87 vim-patch:8337d77: runtime(netrw): MS-Windows: fix netrw not being able to navigate to parent folder (#35982)
fixes: vim/vim#18421
closes: vim/vim#18464

https://github.com/vim/vim/commit/8337d77effac6b556a4db1f5dd9f722c48e38a59

Co-authored-by: Miguel Barro <miguel.barro@live.com>
2025-10-02 01:57:53 +00:00
zeertzjq ca377f3c35 vim-patch:1ae980a: runtime(doc): fix inconsistent indent in cmdline.txt
Also fix typo in autoload/netrw.vim.

related: vim/vim#18371
closes: vim/vim#18376

https://github.com/vim/vim/commit/1ae980a9cb8d8cb5e5897f3708ddeb7c8c0555bd
2025-09-25 06:50:44 +08:00
zeertzjqandChristian Brabandt dd630e7f84 vim-patch:5830407: runtime(netrw): 'equalalways' is not always respected (#35894)
fixes: vim/vim#18358

https://github.com/vim/vim/commit/58304078ad0a4954fe57699acc6e75d0b9da86c0

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-24 00:03:38 +00:00
zeertzjqandHirohito Higashi 3c480fca57 vim-patch:5bf41e7: runtime(netrw): update regex to handle remote archives (#35822)
closes: vim/vim#18318

https://github.com/vim/vim/commit/5bf41e74185b903836948ef501375792f70acb12

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-09-18 08:01:33 +08:00
Yochem van RosmalenandJustin M. Keyes a57c7238f9 refactor(plugins)!: remove shellmenu #35815
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-09-17 11:03:58 -07:00
Jaehwang JungandTom Benham 9ce21c9cf5 vim-patch:9e100b8: runtime(netrw): only keep cursor position in tree listing mode
fixes: vim/vim#16255
closes: vim/vim#18275

https://github.com/vim/vim/commit/9e100b8d14ceb562bcb2c60033a3d92ec4d2c126

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

https://github.com/vim/vim/commit/5f836749fa84cf81342d5a7fd9fad3b5c68c86cc

Co-authored-by: Miguel Barro <miguel.barro@live.com>
2025-09-13 13:23:14 +09:00
Jaehwang JungandJason Long 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

https://github.com/vim/vim/commit/53466887f71f47ae74227a69ba15120e5f9a161b

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

https://github.com/vim/vim/commit/6a6a44ffb5ad7350a4d313a5faeae17e50bf37a2

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-13 13:22:08 +09:00
Jaehwang Jungandveotos 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

https://github.com/vim/vim/commit/c849b17e192ca152573ea0c99b36755dc2f3ffb3

Co-authored-by: veotos <veotos@users.noreply.github.com>
2025-09-13 13:22:08 +09:00
Jaehwang JungandLuca Saccarola 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

https://github.com/vim/vim/commit/0bda7830ac140d2a347fe81edc95314b020b7ca6

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:19:40 +09:00
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

https://github.com/vim/vim/commit/b3eaae21b9f681d23466e7caa0b9d7e32cb4b206

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 JungandLuca Saccarola 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

https://github.com/vim/vim/commit/ef925556cbea4d54e73388da3b3e6c06a1bbcc02

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

https://github.com/vim/vim/commit/2249cc0a4704c46583a08fa36b428d8c04004a49

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

https://github.com/vim/vim/commit/7e47c1e7351267622947d7f2fce180a3ba378c45

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

https://github.com/vim/vim/commit/f5e3b5c04f85b0f69cd2aae81e4938cfb191a790

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

https://github.com/vim/vim/commit/600cd88cdfb1705d7aac9755839ba92282bc32ad

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

https://github.com/vim/vim/commit/1319009d5990764735a300fdbd0dae094604d8db

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

https://github.com/vim/vim/commit/09a62e6f64887106e65e3afa45c4355e0899bc39

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

https://github.com/vim/vim/commit/d1a975ae6418b391088ba11aa85e00b6ab0db80a

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

https://github.com/vim/vim/commit/839fd942654b2a7c90ad0633b1c8bb9da4094cbb

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:18:24 +09:00
Jaehwang JungandLuca Saccarola 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

https://github.com/vim/vim/commit/d62377386c92e500365009412efd3b1232a02c82

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

https://github.com/vim/vim/commit/29d596c80ab08a1f966a16912788576a14c217ad

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

https://github.com/vim/vim/commit/da53af57a7c72e95f84fc0a0b99ae460ff8dab78

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:15:48 +09:00
Jaehwang JungandLuca Saccarola 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

https://github.com/vim/vim/commit/5b97947bbd197fb3aee504c459a52d3a5683740a

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:15:48 +09:00
Jaehwang JungandLuca Saccarola 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

https://github.com/vim/vim/commit/ee1a24b21d10903ee4369d1df514af9eb4c400a6

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:15:48 +09:00
Jaehwang JungandLuca Saccarola 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

https://github.com/vim/vim/commit/73d8222b31be47d274e2a194e3dde25088c6bb69

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:15:48 +09:00
Jaehwang JungandChristian Brabandt 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

https://github.com/vim/vim/commit/6d6ec2ee054b93ea7705a584607956d06dadfe35

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-13 13:15:48 +09:00
Jaehwang JungandLuca Saccarola 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

https://github.com/vim/vim/commit/ec961b05dcc1efb0a234f6d0b31a0945517e75d2

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 13:15:48 +09:00
Jaehwang JungandKonfekt 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

https://github.com/vim/vim/commit/2328a39a54fbd75576769193d7ff1ed2769e2ff9

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-09-13 13:15:48 +09:00
zeertzjqandLuca Saccarola c7a9404019 vim-patch:becf184: runtime(misc): removing saccarosium from maintainer list (#35740)
closes: vim/vim#17848

https://github.com/vim/vim/commit/becf1844e03462b2c997689caafc77bc9c812252

Co-authored-by: Luca Saccarola <github.e41mv@aleeas.com>
2025-09-13 01:18:18 +00:00
zeertzjqandDamien Lejay 03c953008c vim-patch:32d6bd6: runtime(doc): remove dead links (#35297)
related: vim/vim#17879

https://github.com/vim/vim/commit/32d6bd6df2d0e13a8283ba80d506310ba5ba8b61

N/A patch:
vim-patch:8b18345: runtime(doc): Fix 2 minor issues after 32d6bd6df

Co-authored-by: Damien Lejay <damien@lejay.be>
2025-08-11 00:04:30 +00:00
zeertzjqandLane East e12bfb4c70 vim-patch:54fb7ba: runtime(doc): remove mentioning of netrwSettings.vim (#35209)
closes: vim/vim#17925

https://github.com/vim/vim/commit/54fb7ba25665b4a9cc9dc8639f2292e62b43d677

Co-authored-by: Lane East <laneast@laneast.com>
2025-08-07 13:30:38 +00:00
Tom Ampuero 7cd5356a6f feat(net): vim.net.request(), :edit [url] #34140
Problem:
Nvim depends on netrw to download/request URL contents.

Solution:
- Add `vim.net.request()` as a thin curl wrapper:
  - Basic GET with --silent, --show-error, --fail, --location, --retry
  - Optional `opts.outpath` to save to a file
  - Operates asynchronously. Pass an `on_response` handler to get the result.
- Add integ tests (requires NVIM_TEST_INTEG to be set) to test success
  and 404 failure.
- Health check for missing `curl`.
- Handle `:edit https://…` using `vim.net.request()`.

API Usage:
1. Asynchronous request:

    vim.net.request('https://httpbingo.org/get', { retry = 2 }, function(err, response)
      if err then
        print('Fetch failed:', err)
      else
        print('Got body of length:', #response.body)
      end
    end)

2. Download to file:

    vim.net.request('https://httpbingo.org/get', { outpath = 'out_async.txt' }, function(err)
      if err then print('Error:', err) end
    end)

3. Remote :edit integration (in runtime/plugin/net.lua) fetches into buffer:

    :edit https://httpbingo.org/get
2025-07-13 13:43:11 -07:00