refactor(previewer): remove with_preview_window (#2563)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
local context_manager = require "plenary.context_manager"
|
||||
local ts_utils = require "telescope.utils"
|
||||
local strings = require "plenary.strings"
|
||||
local conf = require("telescope.config").values
|
||||
@@ -53,18 +52,6 @@ utils.filetype_detect = function(filepath)
|
||||
end
|
||||
end
|
||||
|
||||
utils.with_preview_window = function(status, bufnr, callable)
|
||||
if bufnr and vim.api.nvim_buf_call and false then
|
||||
vim.api.nvim_buf_call(bufnr, callable)
|
||||
else
|
||||
return context_manager.with(function()
|
||||
vim.cmd(string.format("noautocmd call nvim_set_current_win(%s)", status.preview_win))
|
||||
coroutine.yield()
|
||||
vim.cmd(string.format("noautocmd call nvim_set_current_win(%s)", status.prompt_win))
|
||||
end, callable)
|
||||
end
|
||||
end
|
||||
|
||||
-- API helper functions for buffer previewer
|
||||
--- Job maker for buffer previewer
|
||||
utils.job_maker = function(cmd, bufnr, opts)
|
||||
|
||||
Reference in New Issue
Block a user