weirongxu / coc-explorer

📁 Explorer for coc.nvim
MIT License
1.15k stars 45 forks source link

Pressing `ENTER` after search jumps to file but not to directories #560

Closed farzadmf closed 1 year ago

farzadmf commented 1 year ago

Describe the bug

I press / and start searching for something, once I filter out, I press ENTER:

Result from CocInfo

## versions

vim version: NVIM v0.8.2
node version: v17.4.0
coc.nvim version: 0.0.82-b11a93ba 2022-12-25 15:19:13 +0800
coc.nvim directory: /Users/farzadmf/.vim/plugged/coc.nvim
term: tmux
platform: darwin

## Log of coc.nvim

2023-01-18T22:16:45.666 INFO (pid:31329) [plugin] - coc.nvim initialized with node: v17.4.0 after 716
2023-01-18T22:16:45.668 INFO (pid:31329) [attach] - receive notification: highlight []
2023-01-18T22:16:52.580 INFO (pid:31329) [attach] - receive notification: doAutocmd [ 4, 1 ]
2023-01-18T22:16:52.597 INFO (pid:31329) [attach] - receive notification: doAutocmd [ 1 ]
2023-01-18T22:16:52.897 INFO (pid:31329) [attach] - receive notification: highlight []
2023-01-18T22:16:54.111 INFO (pid:31329) [attach] - receive notification: doAutocmd [ 1 ]
2023-01-18T22:16:54.383 INFO (pid:31329) [attach] - receive notification: doAutocmd [ 1 ]
2023-01-18T22:16:54.391 INFO (pid:31329) [attach] - receive notification: runCommand [ 'explorer' ]
2023-01-18T22:16:54.421 INFO (pid:31329) [attach] - receive notification: doAutocmd [ 1 ]
2023-01-18T22:16:54.513 INFO (pid:31329) [attach] - receive notification: doAutocmd [ 3, 6 ]
2023-01-18T22:16:54.718 INFO (pid:31329) [attach] - receive notification: doAutocmd [ 1 ]
2023-01-18T22:16:54.974 INFO (pid:31329) [attach] - receive notification: doAutocmd [ 1 ]
2023-01-18T22:16:55.273 INFO (pid:31329) [attach] - receive notification: highlight []
2023-01-18T22:16:55.839 INFO (pid:31329) [attach] - Request action: doKeymap [ 'coc-explorer-key-n-/' ]
2023-01-18T22:16:55.847 INFO (pid:31329) [attach] - receive notification: openList [ 'explorerFiles' ]
2023-01-18T22:16:55.931 INFO (pid:31329) [attach] - receive notification: doAutocmd [ 1 ]
2023-01-18T22:16:55.933 INFO (pid:31329) [attach] - receive notification: doAutocmd [ 3, 7 ]
2023-01-18T22:16:56.231 INFO (pid:31329) [attach] - receive notification: highlight []
2023-01-18T22:16:57.823 INFO (pid:31329) [attach] - receive notification: doAutocmd [ 1 ]
2023-01-18T22:16:57.824 INFO (pid:31329) [attach] - receive notification: doAutocmd [ 4, 7 ]
2023-01-18T22:16:58.123 INFO (pid:31329) [attach] - receive notification: highlight []
2023-01-18T22:17:07.280 INFO (pid:31329) [attach] - receive notification: showInfo []

Steps to reproduce Steps to reproduce the behavior:

  1. execute nvim
  2. Open coc-explorer (e.g., :CocCommand explorer)
  3. Start searching by pressing / (or f)
  4. Narrow down your search to a directory
  5. Press ENTER; nothing happens

Expected behavior

Once I search for something (either a folder or a file), I expect that by pressing ENTER, the cursor would jump to the thing I searched.

Screenshots

Additional context I have been using this feature for a while, but, honestly, I'm not sure if I was searching for files that I didn't notice this behavior or it's something that's happened pretty recently and I hadn't noticed

weirongxu commented 1 year ago

Actually, I can't reproduce it. Have you use the fd command with any configuration?

weirongxu commented 1 year ago

Well, I reproduced the it after updating the fd.

farzadmf commented 1 year ago

Thank you @weirongxu for fixing this