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

fzf-lua showing previous buffer in the new tab #35

Open
yavorski opened this issue Sep 15, 2024 · 2 comments
Open

fzf-lua showing previous buffer in the new tab #35

yavorski opened this issue Sep 15, 2024 · 2 comments

Comments

@yavorski
Copy link

When a file is opened with <ctrl-t> from FzfLua files picker, the previous buffer is also shown in the new tab.
Using lualine tabline, readme.mdis the only file in tab-1, when opening init.lua in tab-2, readme is shown there too.

image

@yavorski
Copy link
Author

Noticed that fzf-lua is using tab split, so I decided to override it and use tabnew instead, and it works for now.

config = function(_, options)
  local A = require("fzf-lua.actions")

  A.file_tabedit = function(selected, opts)
    local vimcmd = "tabnew | <auto>"
    A.vimcmd_entry(vimcmd, selected, opts)
  end

  require("fzf-lua").setup(options)
end

@ofseed
Copy link

ofseed commented Sep 20, 2024

I found that neogit and diffview also have this issue, but in the demo from the project's README, neogit works fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants