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

<Leader>b gets weirdly filtered with let g:Lf_RememberLastSearch = 1 #89

Closed
MightyCreak opened this issue Nov 7, 2017 · 4 comments
Closed
Labels

Comments

@MightyCreak
Copy link

With let g:Lf_RememberLastSearch = 0 I can simply switch to the previous buffer by doing <Leader>b<Enter>, but when I do let g:Lf_RememberLastSearch = 1 then the same command put me back on the same buffer.

Workaround: <Leader>b<Backspace><Enter>

@MightyCreak MightyCreak changed the title <Leader>b gets weirdly filtered with let g:Lf_RememberLastSearch = 1 <Leader>b gets weirdly filtered with let g:Lf_RememberLastSearch = 1 Nov 7, 2017
@Yggdroot
Copy link
Owner

Yggdroot commented Nov 8, 2017

It works as designed. If you just want to switch to previous buffer, you don't have to use LeaderF, use ctrl-6.

@MightyCreak
Copy link
Author

MightyCreak commented Nov 8, 2017

Thanks for Ctrl-6, didn't know this one.

Though I really think the described behaviour should not be the default design.

Say we have 4 buffers and no search remembered (bold is the current buffer, italic is the previous one): aaaa, aabb, bbbb, bbaa.

With RememberLastSearch disabled, if I hit <Leader>B I got this list:

  • bbaa
  • aabb
  • bbbb
  • aaaa

With RememberLastSearch enabled, if I hit <Leader>B I got this list:

  • aaaa
  • aabb
  • bbbb
  • bbaa

Although I have search for nothing before. Don't you find it weird that the behaviour is different in this case? Even weirder I have to hit backspace on an empty line to get the same old behaviour. When I enable RememberLastSearch, I expect to keep the same search words, but not to get the same search results (at least, that's how I pictured it in my mind when I proposed it to you ;) ).

I don't really care to remember the last search results, since the asynchronous system allows to retrieve very quickly the filtered results based on the remembered search words.

Ctrl-6 is nice, but it only works for the current and last buffer. I use <Leader>B as I would use Ctrl-Tab in Visual Studio: by default I get to the previous tab (buffers in vim), but if I continue to use Tab (Arrow-Down in LeaderF), I browse the tabs sorted in the MRU order.

Since I can have up to a dozen buffers open at the same time, I find that behaviour pretty useful.

Yggdroot added a commit that referenced this issue Nov 10, 2017
@Yggdroot Yggdroot added the bug label Nov 11, 2017
@Yggdroot
Copy link
Owner

Fixed.

@MightyCreak
Copy link
Author

I'll try that on Monday, thank you!

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