Skip to content
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

运行 :LeaderfMru,gvim界面卡死 #220

Closed
2 of 6 tasks
ckelsel opened this issue Sep 14, 2018 · 12 comments
Closed
2 of 6 tasks

运行 :LeaderfMru,gvim界面卡死 #220

ckelsel opened this issue Sep 14, 2018 · 12 comments
Labels

Comments

@ckelsel
Copy link

ckelsel commented Sep 14, 2018

  • vim or neovim?
    • vim
    • neovim
  • Output of vim --version or nvim --version:
    gvim 8.1
  • Output of :echo has("python"):
    1
  • Output of :echo has("python3"):
    0
  • Output of :echo &pythondll(only vim, not neovim):
    python27.dll
  • Output of :echo &pythonthreedll(only vim, not neovim):
    E113
    E15
  • Output of :py print(sys.version):
    2.7.10 32bit
  • Output of :py3 print(sys.version):
  • Output of :echo g:Lf_Debug_Cmd:
    E121
  • Operating system:
    • Linux
    • Mac OS X
    • Windows
    • Etc.
  • Configurations related to LeaderF in vimrc:
let g:Lf_ShortcutB = '<m-n>'
noremap <c-n> :LeaderfMru<cr>
noremap <m-p> :LeaderfFunction!<cr>
noremap <m-n> :LeaderfBuffer<cr>
noremap <m-m> :LeaderfTag<cr>
let g:Lf_StlSeparator = { 'left': '', 'right': '', 'font': '' }
let g:Lf_WildIgnore = {
        \ 'dir': ['.svn','.git','.hg','.idea','.vscode'],
        \ 'file': ['*.sw?','~$*','*.bak','*.exe','*.o','*.so','*.py[co]']
        \}
let g:Lf_RootMarkers = ['.project', '.root', '.svn', '.git']
let g:Lf_WorkingDirectoryMode = 'Ac'
let g:Lf_WindowHeight = 0.30
let g:Lf_CacheDirectory = expand('~/.vim/cache')
let g:Lf_ShowRelativePath = 0
let g:Lf_HideHelp = 1
let g:Lf_StlColorscheme = 'powerline'
let g:Lf_PreviewResult = {'Function':0, 'BufTag':0}

Describe your question, feature request, or bug.

bug:
调用 :LeaderfMru,导致vim界面卡死

Steps to reproduce

gvim 打开一个windows共享文件\192.168.0.103\bin\1.txt

关闭windows共享
关闭gvim

打开gvim
运行 :LeaderfMru,界面卡死

Actual behaviour

Expected behaviour

界面不卡死

@Yggdroot
Copy link
Owner

windows共享文件是本机共享的吗?

@ckelsel
Copy link
Author

ckelsel commented Sep 14, 2018

不是,另一台Win7虚拟机

@hiberabyss
Copy link

macOS 下也遇到了同样的问题:

macOS: 10.14
neovim version: NVIM v0.3.2-640-gf95e0ae92

@Yggdroot
Copy link
Owner

Yggdroot commented Oct 8, 2018

这需要两台机器,不好复现。
可以试试os.path.exists(共享文件)会不会卡死。

@ckelsel
Copy link
Author

ckelsel commented Oct 9, 2018

一台机器也可以复现
C:\Users\v\.vim\cache\.LfCache\python3\mru\mruCache
根据你的配置改一下这个文件,增加一行不存在的url即可,
\\192.168.0.103\bin\atserver.log

@Yggdroot
Copy link
Owner

Yggdroot commented Oct 9, 2018

试了一下,算是复现了。不是卡死,只是超时时间比较久。
因为直接在vim中用:e \\192.168.0.103\bin\atserver.log也是要好久,这是不可避免的。
除非有什么办法设置windows访问共享文件的超时时间或者对于这种网络文件mru不做记录。

@ckelsel
Copy link
Author

ckelsel commented Oct 9, 2018

是的,可以增加一个选项,对于非本地文件,mru不做记录。

@Yggdroot
Copy link
Owner

Yggdroot commented Oct 9, 2018

@hiberabyss 你的是什么情况?mac下的共享文件是什么样子的?也是\\192.168.0.103\bin\atserver.log这样的吗?

@hiberabyss
Copy link

@Yggdroot 我的不是因为共享文件. 后来发现是因为这个插件 https://github.com/machakann/vim-highlightedyank . 它会在某些情况下会导致整个 vim 窗口都卡住.

我的情况应该和 Leaderf 没有关系.

Yggdroot added a commit that referenced this issue Oct 9, 2018
@Yggdroot
Copy link
Owner

Yggdroot commented Oct 9, 2018

@ckelsel 改好了, 在dev branch,对于以\\开头的文件不再做记录,请试一下。

@ckelsel
Copy link
Author

ckelsel commented Oct 10, 2018

@Yggdroot 已改好。试了下,\\开头的文件不再做记录

@Yggdroot
Copy link
Owner

好,那我merge进去。

@Yggdroot Yggdroot added the bug label Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants