mirror of
https://codeberg.org/cage/tinmop/
synced 2025-02-02 04:36:43 +01:00
- allowed to copy to clipboard post's attachments.
This commit is contained in:
parent
d148cd3570
commit
d1451610dd
@ -576,6 +576,13 @@
|
||||
|
||||
;; attachments keymap
|
||||
|
||||
(defun copy-to-clipboard (window)
|
||||
(ui:copy-link-to-clipboard window))
|
||||
|
||||
(define-key "C-c" (lambda ()
|
||||
(copy-link-to-clipboard specials:*open-attach-window*))
|
||||
*open-attach-keymap*)
|
||||
|
||||
(define-key "C-J" #'open-message-attach-perform-opening *open-attach-keymap*)
|
||||
|
||||
(define-key "a" #'open-all-message-attachments *open-attach-keymap*)
|
||||
@ -584,7 +591,7 @@
|
||||
|
||||
(define-key "down" #'open-message-attach-go-down *open-attach-keymap*)
|
||||
|
||||
(define-key "k" #'open-message-attach-go-up *open-attach-keymap*)
|
||||
(define-key "k" #'open-message-attach-go-up *open-attach-keymap*)
|
||||
|
||||
(define-key "j" #'open-message-attach-go-down *open-attach-keymap*)
|
||||
|
||||
@ -594,7 +601,9 @@
|
||||
|
||||
(define-key "C-J" #'open-message-link-perform-opening *open-message-link-keymap*)
|
||||
|
||||
(define-key "C-c" #'copy-link-to-clipboard *open-message-link-keymap*)
|
||||
(define-key "C-c" (lambda ()
|
||||
(copy-link-to-clipboard specials:*open-message-link-window*))
|
||||
*open-message-link-keymap*)
|
||||
|
||||
(define-key "up" #'open-message-link-go-up *open-message-link-keymap*)
|
||||
|
||||
|
@ -2712,6 +2712,7 @@
|
||||
:open-next-visible-link
|
||||
:go-to-next-link
|
||||
:go-to-previous-link
|
||||
:copy-value-to-clipboard
|
||||
:copy-link-to-clipboard
|
||||
:close-open-message-link-window
|
||||
:open-message-link-window-scroll-begin
|
||||
|
@ -1380,13 +1380,17 @@ This makes sense only for gemini file stream, if not this command performs the s
|
||||
'open-message-link-perform-opening'"
|
||||
(%open-message-link-perform-opening t))
|
||||
|
||||
(defun copy-link-to-clipboard ()
|
||||
"Copy the selected link address to clipboard"
|
||||
(when-let* ((selected-line (line-oriented-window:selected-row *open-message-link-window*))
|
||||
(defun copy-value-to-clipboard (window message)
|
||||
"Copy the selected line to clipboard"
|
||||
(when-let* ((selected-line (line-oriented-window:selected-row window))
|
||||
(url (line-oriented-window:normal-text selected-line)))
|
||||
(with-notify-errors
|
||||
(os-utils:copy-to-clipboard url)
|
||||
(info-message (_ "Address copied to clipboard")))))
|
||||
(info-message message))))
|
||||
|
||||
(defun copy-link-to-clipboard (window)
|
||||
(copy-value-to-clipboard window
|
||||
(_ "Address copied to clipboard")))
|
||||
|
||||
(defun close-open-message-link-window ()
|
||||
(when-window-shown (*open-message-link-window*)
|
||||
|
Loading…
x
Reference in New Issue
Block a user