weirongxu / coc-explorer

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

[BUG] Can't keep explorer panel at the left when delete buffer #552

Closed tmpm697 closed 1 year ago

tmpm697 commented 1 year ago

Describe the bug When open multiple buffers and then quit one of these buffers, open new buffer from explorer should put them to right

Result from CocInfo

## versions

vim version: NVIM v0.8.1
node version: v16.18.0
coc.nvim version: 0.0.82-9be85ae4 2022-12-05 04:50:22 +0800
coc.nvim directory: /home/user/.config/nvim/pack/default/start/coc.nvim
term: tmux
platform: linux

## Log of coc.nvim

2022-12-05T21:14:57.584 INFO (pid:395019) [attach] - receive notification: highlight []
2022-12-05T21:14:57.785 INFO (pid:395019) [attach] - receive notification: highlight []
2022-12-05T21:14:57.985 INFO (pid:395019) [plugin] - coc.nvim initialized with node: v16.18.0 after 547
2022-12-05T21:15:00.218 INFO (pid:395019) [attach] - receive notification: highlight []
2022-12-05T21:15:00.913 INFO (pid:395019) [attach] - receive notification: highlight []

Steps to reproduce Steps to reproduce the behavior:

  1. execute nvim
  2. :CocExplorer ...
  3. open a buffer from explorer panel on the left
  4. select that buffer (ctrl-l) and then issue :bd to delete the current buffer --> correct, an empty buffer created replace deleted buffer, explorer keeps stay at the left of screen
  5. select new two buffers (files) from explorer, select one of them and the issue :bd --> incorrect, now explorer buffer take full screen, try to open new buffer from explorer will put explorer to the right of screen and new buffer will be put on the left of screen.

Expected behavior

  1. explorer always keeps stays in left of screen at any kind of events (above is to delete current selected buffer with multiple buffers opened)
  2. the deleted buffer will replace by empty buffer and select new file from explorer will replace that empty buffer with this one --> this currently correct as described in above 4.

Screenshots

Additional context None

tmpm697 commented 1 year ago

same https://github.com/weirongxu/coc-explorer/issues/525