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

feat(git_status): allow buffer_previewer_maker to receive options #2833

Merged
merged 3 commits into from
Jan 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: pass only preview and field_encoding fields to buffer previewer
  • Loading branch information
atusy committed Jan 1, 2024
commit 8eb1417be2016ff6f9714a148897829dd2064b18
14 changes: 6 additions & 8 deletions lua/telescope/previewers/buffer_previewer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -979,14 +979,12 @@ previewers.git_file_diff = defaulter(function(opts)
if p == nil or p == "" then
return
end
conf.buffer_previewer_maker(
p,
self.state.bufnr,
vim.tbl_extend("force", opts, {
bufname = self.state.bufname,
winid = self.state.winid,
})
)
conf.buffer_previewer_maker(p, self.state.bufnr, {
bufname = self.state.bufname,
winid = self.state.winid,
preview = opts.preview,
file_encoding = opts.file_encoding,
})
else
local cmd = git_command({ "--no-pager", "diff", "HEAD", "--", entry.value }, opts)
putils.job_maker(cmd, self.state.bufnr, {
Expand Down