Fix browse-at-remote commands in magit
This commit is contained in:
parent
345479c29e
commit
dfbaccca90
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue