branch: elpa/helm
commit c27aec49eb6b8e9063cbd3dc016bec237d4231ec
Author: Thierry Volpiatto <[email protected]>
Commit: Thierry Volpiatto <[email protected]>

    Bind mouse-1 for url in tldr
---
 helm-man.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/helm-man.el b/helm-man.el
index 655f11eadfe..48ece49266c 100644
--- a/helm-man.el
+++ b/helm-man.el
@@ -116,13 +116,16 @@ source.")
         (goto-char (point-min))
         (setq map (let ((m (make-sparse-keymap)))
                     (define-key m (kbd "<return>") #'browse-url-at-point)
+                    (define-key m [mouse-1] #'browse-url-at-point)
                     m))
         (save-excursion
           (while (re-search-forward "http[s]://" nil t)
             (let* ((pos (bounds-of-thing-at-point 'url))
                    (ov (make-overlay (car pos) (cdr pos))))
               (overlay-put ov 'face 'font-lock-keyword-face)
-              (overlay-put ov 'keymap map))))
+              (overlay-put ov 'keymap map)
+              (overlay-put ov 'mouse-face 'highlight)
+              (overlay-put ov 'help-echo "mouse-1: Browse url"))))
       (local-set-key "q" 'quit-window)))))
 
 (defun helm-man--tldr-cache ()

Reply via email to