 
 (autoload 'browse-at-remote-get-url "browse-at-remote")
 (autoload 'browse-at-remote--file-url "browse-at-remote")
+
+(defun +vc--remote-file-or-region-link ()
+  (if (or (doom-region-active-p) (not buffer-file-name))
+      (browse-at-remote-get-url)
+    (browse-at-remote--file-url (buffer-file-name))))
 
 ;;;###autoload
 (defun +vc/browse-at-remote-file-or-region ()

If a selection is active, highlight them. Otherwise omits the #L<N> suffix in
the URL."
  (interactive)
  (let ((url
         (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)
    (message "Copied to clipboard: %S" url)))


If a selection is active, highlight them. Otherwise omits the #L<N> suffix in
the URL."
  (interactive)
  (browse-url (+vc--remote-file-or-region-link)))

;;;###autoload
(defun +vc/browse-at-remote-kill-file-or-region ()
