Hi,
I am recently trying the new findfunc feature. I found that the
arguments passed to findfunc was different in Linux and macOS.
For example, when I type `:find gvim ext` in cmdline, every time I
trigger `wildchar`, in macOS, findfunc receives a full list of arguments,
while in Linux, findfunc only receives the last arguments.
The minimal configuration to reproduce:
```vim
func Find(arg, _)
echom a:arg
if get(s:, 'filescache', []) == []
let s:filescache = systemlist('find . -path "*/.git" -prune -o -type f -print')
endif
return a:arg == '' ? s:filescache : matchfuzzy(s:filescache, a:arg)
endfunc
autocmd CmdlineEnter : let s:filescache = []
set wildoptions=pum
set wildmode=noselect
autocmd CmdlineChanged [:\/\?] call wildtrigger()
```
Run `:messages` after `:find gvim e`. In macOS, I got:
```
g
gv
gvi
gvim
gvim
gvim e
```
While in Linux, I got:
```
g
gv
gvi
gvim
e
```
I compiled the master branch (current commit:
<c05335082adb21d99d96374779856444a3a0688f>) in both macOS and Arch
Linux, with the following steps. (I had never compiled it myself before,
so I am not sure if it is the expected way or not.)
```bash
cd src
./configure --with-features=huge
make -j
```
I got error message `Failed to source defaults.vim` for the self
compiled vim when executing with `vim --clean`. I think it didn't affect
the behavior above.
Thanks,
Guangxiong Lin
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vim_use/aNdA1e8ZdYKgDIeQ%40ocarina-of-time.
Friday, September 26, 2025
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment