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

Having user defined Sort function breaks ? mapping #202

Closed
habamax opened this issue Sep 10, 2020 · 6 comments · Fixed by #205
Closed

Having user defined Sort function breaks ? mapping #202

habamax opened this issue Sep 10, 2020 · 6 comments · Fixed by #205
Labels
bug Something isn't working

Comments

@habamax
Copy link

habamax commented Sep 10, 2020

I press ? to get available mappings and it errors with:

image

If I remove/rename function Sort everything works.

@lambdalisue
Copy link
Owner

Wow... I didn't know that the function local variable conflicts with the global variable...... Thanks for the report. I'll consider ways to avoid that.

@lambdalisue
Copy link
Owner

Prob. #205 fix the issue. Please try @habamax

@lambdalisue lambdalisue added the bug Something isn't working label Sep 11, 2020
@habamax
Copy link
Author

habamax commented Sep 11, 2020

@lambdalisue thx, it works now

@habamax
Copy link
Author

habamax commented Sep 11, 2020

But I think there is another issue appeared:

image

  1. I have toggled fern drawer
  2. call a command that closes all windows and loads set of new buffers
" Open vim configs
command! Init :silent only
            \<bar>:exe printf("e %s/vimrc", fnamemodify($MYVIMRC, ":p:h"))
            \<bar>:exe printf("bo vs %s/plugin/mappings.vim", fnamemodify($MYVIMRC, ":p:h"))
            \<bar>:exe printf("bo vs %s/plugin/pack_list.vim", fnamemodify($MYVIMRC, ":p:h"))
            \<bar>:exe printf("bo vs %s/plugin/pack_setup.vim", fnamemodify($MYVIMRC, ":p:h"))
            \<bar>:exe printf("bo vs %s/after/plugin/setup.vim", fnamemodify($MYVIMRC, ":p:h"))
            \<bar>:1wincmd w
  1. Try to change windows with C-w w

PS, and it is actually even simpler: just toggle fern drawer with:

 nnoremap <F8> :Fern . -drawer -toggle -reveal=%<CR>

image

@lambdalisue
Copy link
Owner

lambdalisue commented Sep 11, 2020

Ah sorry. I've noticed that bug. I've applied nonrelated changes as well on that PR by mistake. I'll fix that before the merge 👍

lambdalisue added a commit that referenced this issue Sep 13, 2020
@habamax
Copy link
Author

habamax commented Sep 13, 2020

Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants