| Age | Commit message (Collapse) | Author | Files |
|
and file: URLs
Problem: runtime(netrw): shell-injection via sftp: and file: URLs
(Joshua Rogers)
Solution: Escape temporary file names, harden filename suffix regex,
drop unused g:netrw_tmpfile_escape variable
Supported by AI
https://github.com/vim/vim/commit/405e2fb6d54d5653523809e2853d99d1c000a5fc
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: runtime(netrw): ~ note expanded on MS Windows
(Tom Vamvanij)
Solution: Expand ~ on MS Windows (Yasuhiro Matsumoto)
On Windows, ":Explore ~" did nothing because the tilde expansion was
gated to Unix/Cygwin only. Additionally, substitute() interprets
backslashes in the replacement string specially (e.g. \U as a case
modifier), which would corrupt $HOME values like C:\Users\name even
if the branch were taken.
Include has("win32") in the guard, anchor the pattern to the start of
the string, and escape backslashes, ampersands and tildes in $HOME
before substituting.
fixes: vim/vim#20003
closes: vim/vim#20014
https://github.com/vim/vim/commit/723c0acf2535c87a5b7be0284e7379e071a1d610
Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
|
https://github.com/vim/vim/commit/21c0cd29f808e32a7c159889c6dcf7a6fbf189f7
Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
|
Problem: runtime(netrw): RFC2396 decoding double escaping spaces
(lilydjwg, after 3e60f03d942d6bb0f7eac)
Solution: Remove escape() call, since we are using fnameescape() anyhow
fixes: vim/vim#19913
https://github.com/vim/vim/commit/ab4ebb62ee2cbe5e25fb1746ac5dbe63a9d50260
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
https://github.com/vim/vim/commit/3e60f03d942d6bb0f7eac61b149e83615518cec0
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
validation
Problem: netrw: does not take port into account in hostname validation
(after v9.2.0073)
Solution: Update hostname validation check and test for an optional port
number (Miguel Barro)
closes: vim/vim#19533
https://github.com/vim/vim/commit/a6198523fb28a50d96945458792cdb4787d3cdda
Co-authored-by: Miguel Barro <miguel.barro@live.com>
|
|
Problem: [security]: Insufficient validation of hostname and port in
netrw URIs allows command injection via shell metacharacters
(ehdgks0627, un3xploitable).
Solution: Implement stricter RFC1123 hostname and IP validation.
Use shellescape() for the provided hostname and port.
Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-m3xh-9434-g336
https://github.com/vim/vim/commit/79348dbbc09332130f4c86045e1541d68514fcc1
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: netrw: need better tests for absolute paths
Solution: Use absolutepath(), instead of regex test (Miguel Barro).
closes: vim/vim#19477
https://github.com/vim/vim/commit/bd1dc5b1a652e9f2ba45e3695ea2d83e81992c88
Cherry-pick a typo fix from latest Vim.
Co-authored-by: Miguel Barro <miguel.barro@live.com>
|
|
initialization for Windows
closes: vim/vim#19287
fixes: vim/vim#12290
https://github.com/vim/vim/commit/a2d87ba615f15956116f43f7c70f1b315d679cb4
Co-authored-by: Miguel Barro <miguel.barro@live.com>
|
|
Always pass LC_ALL=C to diff when parsing its output.
Closes #38838
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
|
|
Problem:
Non-trivial to write output of vim.net.request to buffer. Requires extra
code in plugin/net.lua which can't be reused by other plugin authors.
```
vim.net.request('https://neovim.io', {}, function(err, res)
if not err then
local buf = vim.api.nvim_create_buf(true, false)
if res then
local lines = vim.split(res.body, '\n', { plain = true })
vim.api.nvim_buf_set_lines(buf, 0, -1, true, lines)
end
end
end)
```
Solution:
Accept an optional `outbuf` argument to indicate the buffer to write output
to, similar to `outpath`.
vim.net.request('https://neovim.io', { outbuf = buf })
Other fixes / followups:
- Make plugin/net.lua smaller
- Return objection with close() method
- vim.net.request.Opts class
- vim.validate single calls
- Use (''):format(...) instead of `..`
|
|
Problem:
The "tohtml" plugin is loaded by default.
Solution:
- Move it to `pack/dist/opt/nvim.tohtml/`, it is an "opt-in" plugin now.
- Document guidelines.
- Also revert the `plugin/` locations of `spellfile.lua` and `net.lua`.
That idea was not worth the trouble, it will be too much re-education
for too little gain.
|
|
termdebug.vim (#38325)
that was an internal note which somehow slipped in months ago and even
survived the change to Vimscript9
closes: vim/vim#18305
https://github.com/vim/vim/commit/049c76f0e8a1cc26d724fca1a83bfd2da7012403
Co-authored-by: Simon Sobisch <simonsobisch@web.de>
|
|
Problem: termdebug :Break does not support `thread` and `if` arguments
Solution: extend :Break and :Tbreak to accept optional location, thread
{nr}, and if {expr} arguments (Yinzuo Jiang).
closes: vim/vim#19613
https://github.com/vim/vim/commit/5890ea5397743c60c3cdeb93f50239d012120823
AI-assisted: Codex
|
|
Problem: tests: termdebug test may fail and leave temp file around
(Dominique Pellé)
Solution: only run balloon_show() if the function exists, validate
termdebug is running using the g: termdebug_is_running var,
use defer to delete temporary files
Only include:
- guard balloon_show() in the termdebug plugin
- wait for g:termdebug_is_running in Test_termdebug_basic()
The remaining upstream test cleanups do not apply here.
fixes: vim/vim#15334
https://github.com/vim/vim/commit/2979cfc2627d76a9c09cad46a1647dcd4aa73f5f
Co-authored-by: Christian Brabandt <cb@256bit.org>
AI-assisted: Codex
|
|
and EndDebug functions
- Functions are way too long. Readability and maintainability should
be slightly improved.
- Some variables are re-assigned to their initial value at teardown.
This should not be needed since all internal variables are
re-initialized at startup of every Termdebug session.
Only include:
- prompt-mode buffer tracking changes around `promptbufnr`
- prompt buffer cleanup in `CloseBuffers()` and `EndDebugCommon()`
- related `BufUnload` and gdb startup failure cleanup adjustments
The remaining upstream `StartDebug_term()` refactor and helper extraction
do not apply here.
closes: vim/vim#15086
https://github.com/vim/vim/commit/225d4d9212edb27cc4bd473db565517594aaeede
Co-authored-by: Ubaldo Tiberi <ubaldo.tiberi@gmail.com>
AI-assisted: Codex
|
|
For ASM and Variables buffer, check were done to make sure they existed
before attempting to close them, but not for debugged program or gdb
communication. The debugged program window is a user-facing one and
user might close it manually, so it's better to check if it exists.
https://github.com/vim/vim/commit/fce324f55718192ae7de389bb88d423eed7977a2
Co-authored-by: Damien Riegel <damien@riegel.io>
AI-assisted: Codex
|
|
Problem:
In autocmd examples, using "args" as the event-object name is vague and
may be confused with a user-command.
Solution:
Use "ev" as the conventional event-object name.
|
|
Problem:
"nvim -d" doesn't leverage nvim.difftool.
Solution:
If nvim.difftool was enabled via :packadd, automatically
handle "nvim -d" on startup.
nvim -c "packadd nvim.difftool" -d dir1/ dir2/
|
|
Closing the quickfix window previously triggered a WinClosed autocmd
that deleted all difftool autocmds and pushed an empty quickfix list,
making the difftool non-functional. Users who close the quickfix window
to gain screen real estate for viewing diffs had no way to continue
navigating entries.
Remove the qf_win tracking and its associated WinClosed autocmd so that
closing the quickfix window no longer tears down the difftool state.
Closing either diff window still performs full cleanup as before.
The BufWinEnter handler no longer passes with_qf to diff_files, so
navigating entries while the quickfix window is closed reuses the
existing diff layout without forcing a layout rebuild.
Fixes #37388
|
|
Problem:
- Nvim supports multi-line input in prompt buffer, so line(`$`) is not
always the prompt line.
Solution:
- Use `line("':")` to get the prompt line.
|
|
Problem: When using netrw to navigate directories, vim immediately
creates, then deletes a swap file in the entered directory,
causing the lastModifiedTime of that directory to change.
Solution: Use the :noswapfile command modifier in s:NetrwEditFile()
fixes: vim/vim#18854
https://github.com/vim/vim/commit/4e2aafddbb6658a984bb6042026eb4ba5ee423d7
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
chrisbra/matchit
In particular, documentation update from
related: chrisbra/matchit#55
https://github.com/vim/vim/commit/ec46b9d4f2f5a5b36438215aae46c197688d86ac
Co-authored-by: Jon Parise <jon@indelible.org>
|
|
Problem: A few more typos in various files
Solution: Fix those (zeertzjq, antonkesy)
related: neovim/neovim#37348
closes: vim/vim#19153
https://github.com/vim/vim/commit/6a2b5b2246833f7922e38eabab7090e29e89c3a1
Co-authored-by: Anton Kesy <anton@kesy.de>
|
|
closes: vim/vim#19109
https://github.com/vim/vim/commit/e80a4ed845a76ab2d57cb154d9cd10df605c0971
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: When Vim is launched with a UNC directory, netrw treats it as a
relative path and compose it again.
Solution: This is due to `exists("g:netrw_cygwin")` always being true.
We can directly use `g:netrw_cygwin`.
closes: vim/vim#19015
https://github.com/vim/vim/commit/538da34ad3965b57d1298a37db666f00d3ebdb4b
Co-authored-by: tao <2471314@gmail.com>
|
|
s:NetrwMenu() (#36744)
fixes: vim/vim#18829
https://github.com/vim/vim/commit/ab090993ad0d9134837a0299a5c7589c66ef4db5
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
Close #36441
Close #36631
Close #36656
Co-authored-by: Maria José Solano <majosolano99@gmail.com>
Co-authored-by: glepnir <glephunter@gmail.com>
Co-authored-by: "Mike J. McGuirk" <mike.j.mcguirk@gmail.com>
|
|
Add an early exit in diff_dirs to notify the user and return when no
differences are detected between directories.
This prevents Vim:E42: No Errors exception message
See https://github.com/neovim/neovim/pull/35448#issuecomment-3568271456
|
|
(#36606)
closes: vim/vim#18764
https://github.com/vim/vim/commit/040a47a470c47240149dbe6bcf88d0a98ed6a5ba
Co-authored-by: Miguel Barro <miguel.barro@live.com>
|
|
Problem: runtime(netrw): LocalBrowseCheck() wipes unnamed buffers when
g:netrw_fastbrowse=0 (Carlos Falgueras García)
Solution: Check that bufname() is not empty
fixes: vim/vim#18740
closes: vim/vim#18741
https://github.com/vim/vim/commit/384685fadeb19760709d0909dfa00f9544fed10d
Co-authored-by: Christian Brabandt <cb@256bit.org>
|
|
Problem: confusing that there is the tag `undo-tree` (the Vim
implementation) and `undotree` (the Lua plugin for visualization).
Solution: rename tag to undotree-plugin. Mention the plugin in the docs of
|undotree|.
|
|
Problem: Changing permissions fail when using `gp` if the file under
the cursor is not in the current working directory.
Solution: Use the already available `a:curdir` argument and prepend it
to the `<cfile>`, so that the path of the file is correct.
This commit also refactors some leftover `netrw#ErrorMsg` to
`netrw#msg#Notify` (the main refactoring was done in
f5e3b5c04f85b0f69cd2aae81e4938cfb191a790).
closes: vim/vim#18674
https://github.com/vim/vim/commit/fe71c56d8fb6b5a51d1f7f6d54d658ef17a98713
Co-authored-by: Mohammad Reza Karimi <m.r.karimi.j@gmail.com>
|
|
vim/vim#18611 (#36362)
related" vim/vim#18611
closes: vim/vim#18644
https://github.com/vim/vim/commit/58ab3438b7b4e1828efa2f86a5f37af5a7dbf259
|
|
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>
|
|
fix exception when entering the insert mode with paste
closes: vim/vim#16818
https://github.com/vim/vim/commit/ce4f9d2a1016ade19fa07c5b66e58eb084719192
|
|
|
|
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
|
|
- 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>
|
|
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>
|
|
- 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>
|
|
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>
|
|
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.
|
|
Problem: nvim_clear_autocmds clear some other autocmd unexpectedly
Solution: clear it correctly
|
|
Problem: when undo in buffer, undotree window is not updated to
position of correct node
Solution: schedule nvim_win_set_cursor
|
|
* fix(undotree): mark title field annotation as optional
* fix(doc): run make doc for undotree annotation change
|
|
|
|
|
|
Problem
No builtin way to visualize and navigate the undo-tree.
Solution
Include an "opt" plugin.
|
|
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>
|