summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2024-03-27 11:32:31 +0100
committerStefan Haller <stefan@haller-berlin.de>2024-03-29 10:55:33 +0100
commitb9a75ee0edbe6c8316a94db4cb3dcd71a696f099 (patch)
tree6c7d673fadea0ad8d0f43c18160f39126628c17f
parentd102f12304177a5bdb5dd3d21eea7a31f59bfc16 (diff)
Make links clickable in confirmation panels
This is not opt-in, we do it always. I can't imagine a situation where we wouldn't want it.
-rw-r--r--pkg/gui/global_handlers.go8
-rw-r--r--pkg/gui/keybindings.go6
2 files changed, 14 insertions, 0 deletions
diff --git a/pkg/gui/global_handlers.go b/pkg/gui/global_handlers.go
index c20b10ad7..c64a20a9e 100644
--- a/pkg/gui/global_handlers.go
+++ b/pkg/gui/global_handlers.go
@@ -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)
}
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go
index 02405b9b6..9c4acd1ee 100644
--- a/pkg/gui/keybindings.go
+++ b/pkg/gui/keybindings.go
@@ -249,6 +249,12 @@ func (self *Gui) GetInitialKeybindings() ([]*types.Binding, []*gocui.ViewMouseBi
},
{
ViewName: "confirmation",
+ Key: gocui.MouseLeft,
+ Modifier: gocui.ModNone,
+ Handler: self.handleConfirmationClick,
+ },
+ {
+ ViewName: "confirmation",
Key: gocui.MouseWheelUp,
Handler: self.scrollUpConfirmationPanel,
},