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

bug: preview buffer don't open #6

Open
kkharji opened this issue Sep 24, 2021 · 0 comments
Open

bug: preview buffer don't open #6

kkharji opened this issue Sep 24, 2021 · 0 comments

Comments

@kkharji
Copy link
Member

kkharji commented Sep 24, 2021

Maybe something here is deprecated

attach_mappings = function()
      actions.select_default:replace(function(prompt_bufnr, cmd)
        actions.close(prompt_bufnr)
        local last_bufnr = require("telescope.state").get_global_key "last_preview_bufnr"
        if cmd == "edit" then
          vim.cmd(string.format(":buffer %d", last_bufnr))
        elseif cmd == "new" then
          vim.cmd(string.format(":sbuffer %d", last_bufnr))
        elseif cmd == "vnew" then
          vim.cmd(string.format(":vert sbuffer %d", last_bufnr))
        elseif cmd == "tabedit" then
          vim.cmd(string.format(":tab sb %d", last_bufnr))
        end
      end)

      return true
    end
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

1 participant