Skip to content

Commit

Permalink
magit-copy-*: simplify call to copy-region-as-kill
Browse files Browse the repository at this point in the history
The BEG and END arguments are meaningless when REGION is non-nil.
  • Loading branch information
tarsius committed Aug 14, 2016
1 parent fe37cf6 commit 84b4e76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lisp/magit.el
Original file line number Diff line number Diff line change
Expand Up @@ -3054,7 +3054,7 @@ like `kill-ring-save' would, instead of behaving as described
above."
(interactive)
(if (use-region-p)
(copy-region-as-kill (mark) (point) 'region)
(copy-region-as-kill nil nil 'region)
(-when-let* ((section (magit-current-section))
(value (magit-section-value section)))
(magit-section-case
Expand Down Expand Up @@ -3097,7 +3097,7 @@ like `kill-ring-save' would, instead of behaving as described
above."
(interactive)
(if (use-region-p)
(copy-region-as-kill (mark) (point) 'region)
(copy-region-as-kill nil nil 'region)
(-when-let (rev (cond ((memq major-mode '(magit-cherry-mode
magit-log-select-mode
magit-reflog-mode
Expand Down

0 comments on commit 84b4e76

Please sign in to comment.