# Contributers: @lacygoill
# Shane-XB-Qian
# Andrew Radev
-# Last Change: 2025 Oct 17
+# thinca
+# Last Change: 2026 Feb 10
#
# Vim script to handle jumping to the targets of several types of Vim commands
# (:import, :packadd, :runtime, :colorscheme), and to autoloaded functions of
if stridx(curfunc, '#') >= 0
var parts = split(curfunc, '#')
var path = $"autoload/{join(parts[0 : -2], '/')}.vim"
- var resolved_path = globpath(&runtimepath, path)
+ var resolved_path = globpath(&runtimepath, path, 1, 1)
- if resolved_path != ''
+ if !resolved_path->empty()
var function_pattern: string = $'^\s*\%(:\s*\)\=fun\%[ction]!\=\s\+\zs{curfunc}('
resolved_path->Open(editcmd, function_pattern)
endif