Shougo / denite.nvim

:dragon: Dark powered asynchronous unite all interfaces for Neovim/Vim8
Other
2.06k stars 215 forks source link

use <esc> or q can't exit denite buf return to the last file #271

Closed fcying closed 7 years ago

fcying commented 7 years ago

Problems summary

when I use esc or q to exit the denite, it can't return to the last file.

============================================== I found the cause, my test folder have a t folder, when I rename or delete it, denite will work right. I test in other folder, when I create a new folder name t, then denite will work error.

Expected

exit the denite return to the last edit file

Environment Information (Required!)

Provide a minimal init.vim with less than 50 lines (Required!)

set nocompatible

let g:config_dir=$VIM
let g:plugin_dir = g:config_dir . '/plugged'
let g:plugin_manager_dir = g:plugin_dir . '/dein.vim'
exec 'set runtimepath+=' . g:plugin_manager_dir

if dein#load_state(expand(g:plugin_dir))
  call dein#begin(expand(g:plugin_dir))
  call dein#add(expand(g:plugin_manager_dir))
  call dein#add('Shougo/vimproc.vim', {'build' : 'Tools\update-dll-mingw.bat'})
  call dein#add('Shougo/denite.nvim')
  call dein#end()
  call dein#save_state()
endif

filetype plugin indent on
syntax enable

nnoremap <silent> ff :<C-u>Denite file_rec<CR>

The reproduce ways from neovim starting (Required!)

  1. vim test.c
  2. type ff
  3. type esc or type c-o, q
  4. can't see the test.c file

Screen shot (if possible)

vim test.c 1 type ff 2 type esc 3 testvim.zip

Upload the log file

messages has nothing.

Shougo commented 7 years ago

I have created t directory and tested it, but I cannot reproduce the behavior.

Shougo commented 7 years ago

I have tested the below vimrc.

set rtp+=~/.cache/dein/repos/github.com/Shougo/denite.nvim

filetype plugin indent on
syntax enable

nnoremap <silent> ff :<C-u>Denite file_rec<CR>
fcying commented 7 years ago

only reproduce in windows..

I test in ubuntu, it work right.

Shougo commented 7 years ago

Oh.... It is hard to fix.

Please check the code.

https://github.com/Shougo/denite.nvim/blob/master/rplugin/python3/denite/ui/default.py#L466

AlexMasterov commented 7 years ago

@Shougo Interesting behavior when opening testvim folder via :Denite file_rec command. If you delete the folder testvim\t, then it works fine.

Magic folder (testvim)

Magic folder

Normal folder (without testvim\t)

Normal folder

Shougo commented 7 years ago

Wow! The initial window is already closed. I don't know why...

Shougo commented 7 years ago

This is reproduced on the latest Vim and denite?

Shougo commented 7 years ago

No response.

fcying commented 7 years ago

It can be reproduced on the Vim 8.0.728 and the latest denite in windows 10x64.

Shougo commented 7 years ago

@fcying It seems Vim related problem. It can be reproduced in neovim?

Shougo commented 7 years ago

And you can debug it. Denite uses quit_buffer() function to quit the buffer.

fcying commented 7 years ago

It can be reproduced in neovim, If I use the folder 't', it make error. NVIM v0.2.1-578-g07972f9e5 reproduced way: cd D:\tool\testvim d:\tool\Neovim\bin\nvim-qt ff 1

I have not used python....I'll try on the weekend.

Shougo commented 7 years ago

It seems the another problem. Because it is not when quit.

Shougo commented 7 years ago

Why nomodifiable is set?
Please check the denite buffer. It seems open wrong buffer.

Shougo commented 7 years ago

Please check :silent keepalt new botright [denite] behavior from the command line. I think it is broken.

Shougo commented 7 years ago

Oh, I get it. [denite] is used as wildcard in Windows.

Shougo commented 7 years ago

I will fix the problem.

fcying commented 7 years ago

I update the latest version. nvim work fine now. vim make a lot of error.

1

Shougo commented 7 years ago

@fcying I have fixed the errors.

fcying commented 7 years ago

Now everything is working fine~