-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: removing open file mangles window selector functionality #512
Labels
bug
Something isn't working
Comments
Please write a minimal vimrc and step by step procedure to reproduce that situation. |
I put together a minimal vimrc to help reproduce this. It'll create two files in your current working directory, set packpath=
" UPDATE WITH YOUR PATH
set runtimepath^=/home/brandon/.dotfiles/.vim/pack/plugins/opt/vim-fern
filetype plugin indent on
syntax on
"----------------------------------------------------------------
" Add extra settings here to reproduce the issue...
"----------------------------------------------------------------
echomsg "Reproducing lambdalisue/vim-fern Issue #512"
echomsg "See Further: https://github.com/lambdalisue/vim-fern/issues/512"
echomsg "To reproduce the issue, execute:"
echomsg " :call Reproduce()"
let g:fern#window_selector_use_popup = 1
function! Reproduce() abort
" create two empty files
edit test-1 | write
edit test-2 | write
" open the fern window
Fern . -toggle -drawer -width=50 -keep -wait -reveal=%
" With the Fern window and 'test-2' open, remove file 'test-2'.
execute "normal \<plug>(fern-action-remove=)y\<CR>"
" Reopen 'test-1'.
edit test-1
" Show the Fern window again.
Fern . -toggle -drawer -width=50 -keep -wait -reveal=%
" Finally, open (select) 'test-1'.
:exe "normal \<plug>(fern-action-open:select)"
endfunction To reproduce:
You should see something like this: |
Reproduced. I'll investigate. |
@brandon1024 Could you try #517 |
Fixed in #517 🎉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Description
Whenever you remove a file (
<plugin>(fern-action-remove)
) that happens to be the only file open in a window, the file is deleted, the buffer is unloaded, the window is closed, and the fern window is adjusted to fill the screen. This works as expected.However when this happens, the
<plugin>(fern-action-open:select)
mapping no longer works as expected. It offers to open files in the fern window too, though normally it doesn't offer this window to be used. I haven't figured out how to work around this, aside from reloading vim. A bit annoying.You can see what I mean from the screenshot below. Usually it doens't offer to open in the Fern window.
The text was updated successfully, but these errors were encountered: