mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-29 23:17:32 +02:00
Fix tag truncated when copying to clipboard
Copy the whole tag to clipboard instead of truncating to the value of TruncateCopiedCommitHashesTo.
This commit is contained in:
parent
49f8dc2ce4
commit
4856c96521
@ -148,7 +148,7 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
|
||||
{
|
||||
ViewName: "tags",
|
||||
Key: opts.GetKey(opts.Config.Universal.CopyToClipboard),
|
||||
Handler: self.handleCopySelectedSideContextItemCommitHashToClipboard,
|
||||
Handler: self.handleCopySelectedSideContextItemToClipboard,
|
||||
GetDisabledReason: self.getCopySelectedSideContextItemToClipboardDisabledReason,
|
||||
Description: self.c.Tr.CopyTagToClipboard,
|
||||
},
|
||||
|
@ -15,7 +15,7 @@ var CopyToClipboard = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
},
|
||||
SetupRepo: func(shell *Shell) {
|
||||
shell.EmptyCommit("one")
|
||||
shell.CreateLightweightTag("tag1", "HEAD")
|
||||
shell.CreateLightweightTag("super.l000ongtag", "HEAD")
|
||||
},
|
||||
Run: func(t *TestDriver, keys config.KeybindingConfig) {
|
||||
t.Views().Tags().
|
||||
@ -25,7 +25,7 @@ var CopyToClipboard = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
).
|
||||
Press(keys.Universal.CopyToClipboard)
|
||||
|
||||
t.ExpectToast(Equals("'tag1' copied to clipboard"))
|
||||
t.ExpectToast(Equals("'super.l000ongtag' copied to clipboard"))
|
||||
|
||||
t.Views().Files().
|
||||
Focus().
|
||||
@ -34,6 +34,6 @@ var CopyToClipboard = NewIntegrationTest(NewIntegrationTestArgs{
|
||||
Contains("clipboard").IsSelected(),
|
||||
)
|
||||
|
||||
t.Views().Main().Content(Contains("_tag1_"))
|
||||
t.Views().Main().Content(Contains("super.l000ongtag"))
|
||||
},
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user