Skip to content

Commit

Permalink
add copy URL command
Browse files Browse the repository at this point in the history
  • Loading branch information
wd60622 committed Oct 21, 2024
1 parent 5f239b8 commit a8e91b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lua/octo/navigation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ local gh = require "octo.gh"
local graphql = require "octo.gh.graphql"
local utils = require "octo.utils"

local vim = vim

local M = {}

--[[
Expand Down Expand Up @@ -29,6 +31,7 @@ function M.open_in_browser(kind, repo, number)
utils.error "Cannot find repo remote host"
return
end

if not kind and not repo then
local bufnr = vim.api.nvim_get_current_buf()
local buffer = octo_buffers[bufnr]
Expand Down
2 changes: 1 addition & 1 deletion lua/octo/pickers/telescope/provider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1174,7 +1174,7 @@ function M.discussions(opts)
previewer = previewers.discussion.new(opts),
attach_mappings = function(_, map)
action_set.select:replace(replace)
map("i", cfg.picker_config.mappings.open_in_browser.lhs, open_in_browser())

map("i", cfg.picker_config.mappings.copy_url.lhs, copy_url())
return true
end,
Expand Down

0 comments on commit a8e91b8

Please sign in to comment.