Function: majutsu-interactive-toggle-hunk

majutsu-interactive-toggle-hunk is an interactive and natively compiled function defined in majutsu-interactive.el.

Signature

(majutsu-interactive-toggle-hunk)

Documentation

Toggle selection of the hunk at point.

Key Bindings

This command is not in any keymaps.

Source Code

;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-interactive.el
;;; Selection Functions

(defun majutsu-interactive-toggle-hunk ()
  "Toggle selection of the hunk at point."
  (interactive)
  (when-let* ((section (magit-current-section)))
    (when (cl-typep section 'majutsu-hunk-section)
      (let* ((hunk-id (majutsu-interactive--hunk-id section))
             (current (majutsu-interactive--get-selection hunk-id)))
        (majutsu-interactive--set-selection
         hunk-id (if current nil :all))
        (majutsu-interactive--render-overlays)
        (message "%s hunk" (if current "Deselected" "Selected"))))))