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

Escape to close leaderF window shows error when you have only spaces entered #233

Closed
3 of 6 tasks
habamax opened this issue Oct 16, 2018 · 3 comments
Closed
3 of 6 tasks
Labels

Comments

@habamax
Copy link

habamax commented Oct 16, 2018

  • vim or neovim?
    • vim
    • neovim
  • Output of vim --version or nvim --version: vim 8.1, patches 1-477
  • Output of :echo has("python"): 0
  • Output of :echo has("python3"): 1
  • Output of :echo &pythondll(only vim, not neovim): python27.dll
  • Output of :echo &pythonthreedll(only vim, not neovim): python37.dll
  • Output of :py print(sys.version): Could not load library python27.dll
  • Output of :py3 print(sys.version): 3.7.0
  • Output of :echo g:Lf_Debug_Cmd: rg --no-messages --files "."
  • Operating system:
    • Linux
    • Mac OS X
    • Windows
    • Etc.
  • Configurations related to LeaderF in vimrc:
	let g:Lf_StlSeparator = { 'left': '', 'right': '' }
	let g:Lf_ShortcutF = '<leader>ff'
	let g:Lf_Shortcutb = '<leader>b'
	let g:Lf_WindowHeight = 0.30
	cabbrev lf LeaderfFile
	nnoremap <leader>fh :LeaderfHelp<CR>
	nnoremap <leader>fm :LeaderfMru<CR>
	nnoremap <leader>fs :LeaderfSelf<CR>
	nnoremap <leader>fc :LeaderfColorscheme<CR>
	nnoremap <leader>/ :LeaderfLine<CR>
	nnoremap <leader>fdd :LeaderfFile ~/docs<CR>
	packadd leaderF

Describe your question, feature request, or bug.

Error when close the leaderf window
image

Steps to reproduce

  1. :LeaderfFile
  2. input 2+ spaces
  3. press escape

Actual behaviour

Expected behaviour

LeaderF Window should be closed without errors.

@habamax
Copy link
Author

habamax commented Oct 16, 2018

I have fixed it by adding the following to cli.py:

    def writeHistory(self, category):
        if not self._and_delimiter.strip():
            return
...

If you okay with that I can try to provide a PR.

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

Thanks for your report. Your fix seems to make writeHistory() return at the beginning always, so that the history feature is broken.
I have fixed it. Thanks.

@Yggdroot Yggdroot added the bug label Oct 17, 2018
@habamax
Copy link
Author

habamax commented Oct 17, 2018

Thx, fixed for me.

@habamax habamax closed this as completed Oct 17, 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

2 participants