weirongxu / coc-explorer

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

当存在split窗口行为时,有时会出现 浮动窗口页面错误 #472

Closed yaocccc closed 3 years ago

yaocccc commented 3 years ago

个人配置情况: hi CocExplorerNormalFloat ctermbg=none guibg=none

coc-config: "explorer.presets.floating.position": "floating", "explorer.presets.floating.floating-width": 80, "explorer.presets.floating.floating-position": "center",

启动命令::CocCommand explorer --preset floating

复现过程: :CocCommand explorer --preset floating :CocCommand explorer --preset floating :split :bd ::CocCommand explorer --preset floating

2021-08-20_17-08

yaocccc commented 3 years ago

等剔除其它所有插件后的演示如gif show

weirongxu commented 3 years ago

Reproduction script

function s:quit(name, callback)
  call feedkeys("\<ESC>")
  call timer_start(500, a:callback)
endfunction

function s:open(name, quit, callback)
  CocCommand explorer --position floating
  if a:quit
    call timer_start(1000, {-> s:quit(a:name, a:callback)})
  endif
endfunction

function s:split()
  split
  bd
  call s:open('3', v:false, {-> s:end()})
endfunction

function s:open2()
  call s:open('2', v:true, {-> s:split()})
endfunction

function! Start()
  call timer_start(500, {-> s:open('1', v:true, {-> s:open2()})})
endfunction

command! Start call Start()