weirongxu / coc-explorer

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

Windows Terminal: Cursor keeps moving to the bottom of buffer, or to next parent node #537

Closed nbn22385 closed 2 years ago

nbn22385 commented 2 years ago

Issue when using Windows Terminal + PowerShell only.

Is there a custom keymapping I can set to overcome the behavior? If this is out of scope of coc-explorer please close the issue.

So far I have 3 examples of this behavior:

I still have the behavior when disabling all other plugins, mappings, and autocommands.

:verbose map l in coc-explorer produces:

n  l            @<Plug>(coc-explorer-key-n-l)
        Last set from ~/.config/coc/extensions/node_modules/coc-explorer/autoload/coc_explorer/mappings.vim line 13
v  l            @<Plug>(coc-explorer-key-v-l)
        Last set from ~/.config/coc/extensions/node_modules/coc-explorer/autoload/coc_explorer/mappings.vim line 13
Press ENTER or type command to continue
weirongxu commented 2 years ago

Maybe it only happens with special vim versions? I tried vim / nvim on windows terminal + powershell and didn't reproduce

nbn22385 commented 2 years ago

Thanks for the response,

I just set up a fresh VM of Ubuntu 22.04 via Vagrant on Windows Terminal 1.14.228 and the issue is still there.

Then I switched over to a Git Bash terminal and even a vanilla command prompt, and the issue happens over there too, so now I don't know what to think or how else to debug the issue. Edit: still happens in Alacritty too.

On both occasions, I am SSHing into my VM, if you think that matters. Must be something going on at a host level for me on this particular PC.

weirongxu commented 2 years ago

Hmm. I still don't have an idea about this, can you provide a vimrc that can be reproduced?

nbn22385 commented 2 years ago

I was not able to reproduce it on any other platform than a couple Ubuntu VMs on my work computer. 😞

For what it's worth, my minimal vimrc looks like:

function! PackInit() abort
  packadd minpac
  call minpac#init()
  call minpac#add('k-takata/minpac', {'type': 'opt'})
  call minpac#add('neoclide/coc.nvim', {'branch': 'release'})
endfunction

command! PackUpdate call PackInit() | call minpac#update()
command! PackClean  call PackInit() | call minpac#clean()
command! PackStatus packadd minpac | call minpac#status()

let g:coc_global_extensions = ['coc-explorer']
nbn22385 commented 2 years ago

Update:

I just installed my dotfiles setup on a fresh Ubuntu 22.04 docker image and the problem persisted. Then I installed my dotfiles setup on an Ubuntu 20.04 docker image and the problem did not exist. Can you try to reproduce on Ubuntu 22.04?

Demo GIF

nbn22385 commented 2 years ago

This seems like an environment issue on my side, so I'm going to close this one out.