[vim/vim] Fix `gf` in Vim script (PR #19379)

1 view
Skip to first unread message

thinca

unread,
Feb 10, 2026, 2:03:26 PM (20 hours ago) Feb 10
to vim/vim, Subscribed

Problem: gf in Vim script fails if multiple target files exist.
Solution: Use globpath() which returns an array.

In a Vim script, gf on some#func() will jump to autoload/some.vim. In this case, if there are multiple autoload/foo.vims in 'runtimepath', globpath(&runtimepath, path) will return multiple paths, separated by newlines.
As a result, the second and subsequent paths will be executed as commands in autoload/vimgoto.vim:195, causing an error. This change fixes this issue by making the result of globpath() an array.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19379

Commit Summary

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19379@github.com>

Christian Brabandt

unread,
Feb 10, 2026, 4:51:57 PM (17 hours ago) Feb 10
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19379)

thanks


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19379/c3880931009@github.com>

Christian Brabandt

unread,
Feb 10, 2026, 4:53:25 PM (17 hours ago) Feb 10
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#19379)

at one time we should add tests for this plugin, oh well


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19379/c3880936605@github.com>

Christian Brabandt

unread,
Feb 10, 2026, 4:55:17 PM (17 hours ago) Feb 10
to vim/vim, Subscribed

Closed #19379 via 9205344.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19379/issue_event/22687600172@github.com>

Reply all
Reply to author
Forward
0 new messages