[vim/vim] findfunc with extended info doesn't actually find the file (Issue #20163)

2 views
Skip to first unread message

Maxim Kim

unread,
May 7, 2026, 7:41:23 PM (18 hours ago) May 7
to vim/vim, Subscribed
habamax created an issue (vim/vim#20163)

Steps to reproduce

  1. vim --clean
  2. source following
vim9script

set completeopt=menu,popup,fuzzy
set wildmenu wildoptions=pum,fuzzy pumheight=12

var files_cache: list<dict<any>> = []
augroup CmdCompleteResetFind
    au!
    au CmdlineEnter : files_cache = []
augroup END

def Find(cmd_arg: string, _): list<dict<any>>
    if empty(files_cache)
	files_cache = globpath('.', '**', 1, 1)
	    ->filter((_, v) => !isdirectory(v))
	    ->mapnew((_, v) => {
		return {
		    word: v->substitute('^\.[\/]', "", ""),
		    info: $"{getfperm(v)} {strftime("%Y-%m-%d %H:%M:%S", getftime(v))}"}
	    })
    endif
    if empty(cmd_arg)
	return files_cache
    else
	return files_cache->matchfuzzy(cmd_arg, {key: "word"})
    endif
enddef
set findfunc=Find
  1. :cd some-non-home-dir
  2. :find <tab> see the pmenu with info popups
  3. Press <CR> to select and open the file

Expected behaviour

Selected file should be opened in vim. Nothing happens instead.

@zeertzjq fyi

It still works if function returns list of strings.

Version of Vim

9.2.452

Environment

debian13, bash

Logs and stack traces


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20163@github.com>

Maxim Kim

unread,
May 7, 2026, 7:50:39 PM (18 hours ago) May 7
to vim/vim, Subscribed
habamax left a comment (vim/vim#20163)

https://asciinema.org/a/NKOENFuXUm0NuNiL


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20163/4401983079@github.com>

zeertzjq

unread,
May 7, 2026, 8:01:23 PM (18 hours ago) May 7
to vim/vim, Subscribed
zeertzjq left a comment (vim/vim#20163)

You can only return a list of dicts for cmdline completion. Otherwise it's not allowed.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20163/4402034524@github.com>

zeertzjq

unread,
May 7, 2026, 8:03:14 PM (18 hours ago) May 7
to vim/vim, Subscribed
zeertzjq left a comment (vim/vim#20163)

Wait


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20163/4402044662@github.com>

Maxim Kim

unread,
May 7, 2026, 8:03:39 PM (18 hours ago) May 7
to vim/vim, Subscribed
habamax left a comment (vim/vim#20163)

You can only return a list of dicts for cmdline completion. Otherwise it's not allowed. There should be an error.

well, it works for list of strings (as it should for backward compatibility) and it doesn't work for the list of dicts as in my example.

  1. I can see the candidates (files with extended info)
  2. But I can't open any file from that list -- find command just do nothing.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20163/4402046217@github.com>

zeertzjq

unread,
May 7, 2026, 8:05:08 PM (18 hours ago) May 7
to vim/vim, Subscribed
zeertzjq left a comment (vim/vim#20163)

Wait, I thought there was an error for having non-strings in the list. It turns out there wasn't. In that case this should be supported.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20163/4402052856@github.com>

Maxim Kim

unread,
May 7, 2026, 8:07:50 PM (18 hours ago) May 7
to vim/vim, Subscribed
habamax left a comment (vim/vim#20163)

Wait, I thought there was an error for having non-strings in the list. It turns out there wasn't. In that case this should be supported.

There is no error and it works fine up until I try execute :find command with completed item -- it does nothing.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/20163/4402064718@github.com>

Reply all
Reply to author
Forward
0 new messages