Skip to content

Commit

Permalink
Make links clickable in confirmation panels
Browse files Browse the repository at this point in the history
This is not opt-in, we do it always. I can't imagine a situation where we
wouldn't want it.
  • Loading branch information
stefanhaller committed Mar 29, 2024
1 parent d102f12 commit b9a75ee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/gui/global_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ func (gui *Gui) scrollDownConfirmationPanel() error {
return nil
}

func (gui *Gui) handleConfirmationClick() error {
if gui.Views.Confirmation.Editable {
return nil
}

return gui.handleGenericClick(gui.Views.Confirmation)
}

func (gui *Gui) handleCopySelectedSideContextItemToClipboard() error {
return gui.handleCopySelectedSideContextItemToClipboardWithTruncation(-1)
}
Expand Down
6 changes: 6 additions & 0 deletions pkg/gui/keybindings.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
Modifier: gocui.ModNone,
Handler: self.scrollDownConfirmationPanel,
},
{
ViewName: "confirmation",
Key: gocui.MouseLeft,
Modifier: gocui.ModNone,
Handler: self.handleConfirmationClick,
},
{
ViewName: "confirmation",
Key: gocui.MouseWheelUp,
Expand Down

0 comments on commit b9a75ee

Please sign in to comment.