Skip to content

Commit f728b1f

Browse files
jecarodlyongemallo
authored andcommitted
fix(actions): copy hash to unnamed register instead of clipboard (sindrets#606)
Use the unnamed register (") instead of the system clipboard (+) when copying commit hashes. This is more consistent with Vim conventions and works regardless of clipboard support. Fixes sindrets#604
1 parent e144466 commit f728b1f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lua/diffview/scene/views/file_history/listeners.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ return function(view)
208208
if view.panel:is_focused() then
209209
local item = view.panel:get_item_at_cursor()
210210
if item then
211-
vim.fn.setreg("+", item.commit.hash)
211+
vim.fn.setreg('"', item.commit.hash)
212212
utils.info(string.format("Copied '%s' to the clipboard.", item.commit.hash))
213213
end
214214
end

0 commit comments

Comments
 (0)