Closed k-86 closed 10 months ago
Warning: I will close the issue without the minimal init.vim and the reproduction instructions.
I tried toggling hidden files, but it didn't work from e07df9d.
This seems to be the problem. https://github.com/Shougo/ddu.vim/blob/a897c77a109cc551fd0ccb87123a04de179dd932/denops/ddu/ddu.ts#L1574-L1576
ret.sourceOptions === this.#options.sourceOptions // true
https://github.com/Shougo/ddu.vim/blob/a897c77a109cc551fd0ccb87123a04de179dd932/denops/ddu/ddu.ts#L1601
This will fix it, but I'm not sure if it's correct.
const ret = structuredClone(this.#options);
Can toggle.
ddu.vim version (SHA1): a897c77
denops.vim version (SHA1): 16d4bbc
deno version(deno -V output): deno 1.40.2
deno -V
OS: Ubuntu 22.04 in WSL2
neovim/Vim :version output: NVIM v0.9.5 Build type: Release LuaJIT 2.1.1692716794
:version
set rtp+=/path/to/github.com/vim-denops/denops.vim set rtp+=/path/to/github.com/Shougo/ddu.vim set rtp+=/path/to/github.com/Shougo/ddu-ui-ff set rtp+=/path/to/github.com/Shougo/ddu-source-file set rtp+=/path/to/github.com/Shougo/ddu-filter-matcher_hidden call ddu#custom#patch_global(#{ \ ui: 'ff', \ sources: ['file'], \ sourceOptions: #{ \ _: #{ \ matchers:['matcher_hidden'], \ }, \ }, \}) autocmd FileType ddu-ff call s:ddu_ff_setting() function s:ddu_ff_setting() nnoremap <buffer> > \ <Cmd>call ddu#ui#do_action('updateOptions', #{ \ sourceOptions: #{ \ _: #{ \ matchers: ToggleHidden(), \ }, \ }, \ })<CR> \<Cmd>call ddu#ui#do_action('redraw')<CR> endfunction function ToggleHidden() const current = ddu#custom#get_current(b:ddu_ui_name) const source_options = get(current, 'sourceOptions', {}) const source_options_all = get(source_options, '_', {}) const matchers = get(source_options_all, 'matchers', []) return empty(matchers) ? ['matcher_hidden'] : [] endfunction function EchoMatchers() const current = ddu#custom#get_current(b:ddu_ui_name) const source_options = get(current, 'sourceOptions', {}) const source_options_all = get(source_options, '_', {}) const source_options_file = get(source_options, 'file', {}) echo "_:" . string(get(source_options_all, 'matchers')) echo "file:" . string(get(source_options_file, 'matchers')) endfunction
:redir
:message
// before toggle _:['matcher_hidden'] file:['matcher_hidden'] // after toggle _:[] file:['matcher_hidden']
Fixed.
Warning: I will close the issue without the minimal init.vim and the reproduction instructions.
Problems summary
I tried toggling hidden files, but it didn't work from e07df9d.
This seems to be the problem. https://github.com/Shougo/ddu.vim/blob/a897c77a109cc551fd0ccb87123a04de179dd932/denops/ddu/ddu.ts#L1574-L1576
https://github.com/Shougo/ddu.vim/blob/a897c77a109cc551fd0ccb87123a04de179dd932/denops/ddu/ddu.ts#L1601
This will fix it, but I'm not sure if it's correct.
Expected
Can toggle.
Environment Information
ddu.vim version (SHA1): a897c77
denops.vim version (SHA1): 16d4bbc
deno version(
deno -V
output): deno 1.40.2OS: Ubuntu 22.04 in WSL2
neovim/Vim
:version
output: NVIM v0.9.5 Build type: Release LuaJIT 2.1.1692716794Provide a minimal init.vim/vimrc without plugin managers (Required!)
How to reproduce the problem from neovim/Vim startup (Required!)
Upload the log messages by
:redir
and:message
(if errored)