Skip to content

Commit

Permalink
Allow unmarking the marked commit.
Browse files Browse the repository at this point in the history
Once, I hit "." instead of "r ." by accident and have found no way to
reset this mark. This just seems not to be right.
  • Loading branch information
voins authored and mvollmer committed Jan 21, 2009
1 parent 7640638 commit c691bc7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
14 changes: 9 additions & 5 deletions magit.el
Original file line number Diff line number Diff line change
Expand Up @@ -2359,11 +2359,15 @@ Prefix arg means justify as well."
((commit)
(magit-show-commit info #'scroll-down))))

(defun magit-mark-item ()
(interactive)
(magit-section-action (item info "mark")
((commit)
(magit-set-marked-commit info))))
(defun magit-mark-item (&optional unmark)
(interactive "P")
(if unmark
(magit-set-marked-commit nil)
(magit-section-action (item info "mark")
((commit)
(magit-set-marked-commit (if (eq magit-marked-commit info)
nil
info))))))

(defun magit-describe-item ()
(interactive)
Expand Down
11 changes: 7 additions & 4 deletions magit.texi
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,13 @@ kill ring.
Typing @kbd{=} will show the differences from the current commit to
the @dfn{marked} commit.

You can mark the current commit by typing @kbd{.}. Some commands,
such as @kbd{=}, will use the current commit and the marked commit as
implicit arguments. Other commands will offer the marked commit as a
default when prompting for their arguments.
You can mark the current commit by typing @kbd{.}. When the current
commit is already marked, typing @kbd{.} will unmark it. To unmark
the marked commit no matter where point it, use @kbd{C-u .}.

Some commands, such as @kbd{=}, will use the current commit and the
marked commit as implicit arguments. Other commands will offer the
marked commit as a default when prompting for their arguments.

@node Reflogs
@chapter Reflogs
Expand Down

0 comments on commit c691bc7

Please sign in to comment.