mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -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
|
||||
the URL."
|
||||
(interactive)
|
||||
(if (doom-region-active-p)
|
||||
(if (or (doom-region-active-p) (not buffer-file-name))
|
||||
(browse-at-remote)
|
||||
(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."
|
||||
(interactive)
|
||||
(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--file-url (buffer-file-name)))))
|
||||
(kill-new url)
|
||||
|
Reference in New Issue
Block a user