mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Fix browse-at-remote commands in magit
This commit is contained in:
@ -9,7 +9,7 @@
|
|||||||
If a selection is active, highlight them. Otherwise omits the #L<N> suffix in
|
If a selection is active, highlight them. Otherwise omits the #L<N> suffix in
|
||||||
the URL."
|
the URL."
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (doom-region-active-p)
|
(if (or (doom-region-active-p) (not buffer-file-name))
|
||||||
(browse-at-remote)
|
(browse-at-remote)
|
||||||
(browse-url (browse-at-remote--file-url (buffer-file-name)))))
|
(browse-url (browse-at-remote--file-url (buffer-file-name)))))
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ If a selection is active, highlight them. Otherwise omits the #L<N> suffix in
|
|||||||
the URL."
|
the URL."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((url
|
(let ((url
|
||||||
(if (doom-region-active-p)
|
(if (or (doom-region-active-p) (not buffer-file-name))
|
||||||
(browse-at-remote-get-url)
|
(browse-at-remote-get-url)
|
||||||
(browse-at-remote--file-url (buffer-file-name)))))
|
(browse-at-remote--file-url (buffer-file-name)))))
|
||||||
(kill-new url)
|
(kill-new url)
|
||||||
|
Reference in New Issue
Block a user