Skip to content

Commit 36df6b2

Browse files
committed
fix: gist web view action
1 parent eca7d2f commit 36df6b2

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lua/telescope/_extensions/gh_actions.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,18 @@ end
8080
A.gh_web_view = function(type)
8181
return function(prompt_bufnr)
8282
local selection = action_state.get_selected_entry()
83+
local id = ""
8384
actions.close(prompt_bufnr)
8485
local tmp_table = vim.split(selection.value, "\t")
8586
if vim.tbl_isempty(tmp_table) then
8687
return
8788
end
88-
os.execute("gh " .. type .. " view --web " .. tmp_table[1])
89+
if type == "gist" then
90+
id = selection.id
91+
else
92+
id = tmp_table[1]
93+
end
94+
os.execute("gh " .. type .. " view --web " .. id)
8995
end
9096
end
9197

0 commit comments

Comments
 (0)