Open airblade opened 8 years ago
It looks to be an artefact of the way filebeagle opens multiple files at once. I can have a bit of an investigation when I get home.
If it's necessary to jump to the original buffer, perhaps we could add a noautocmd
to the command?
I'm afraid that I have not time to look into this right now. Thank you, @nicwest, for any help you can offer!
the multiple file thing was a red herring. this is being caused by the way filebeagle sets your previous file to be the alternate file after opening a new file. e.g.
:e file1.txt
:e file2.txt
(file2 in window, file1 is alternate)
:FileBeagle
(open file3.txt)
(file3 in window, file2 is alternate)
if we did the same thing minus the line in question this would happen
:e file1.txt
:e file2.txt
(file2 in window, file1 is alternate)
:FileBeagle
(open file3.txt)
(file3 in window, file1 is alternate)
When you open a file in the background (i.e straight to hidden), there is no need to revisit your previous buffer as you're not closing filebeagle.
Seeing as this buffer should be exactly as it was when you left it, running autocmds seems pretty pointless and adding the noautocmd
seems like the right move to me.
Here's my situation:
-
to bring up the FileBeagle directory listing.<CR>
.Between steps 3 and 4, FileBeagle jumps to the original buffer. Please could you explain why?
(I'm asking because I was surprised to see
BufEnter
autocommands being triggered for the original buffer as well as the new buffer instead of just for the new buffer.)