Function: majutsu-interactive--toggle-whole-file
majutsu-interactive--toggle-whole-file is a natively compiled function
defined in majutsu-interactive.el.
Signature
(majutsu-interactive--toggle-whole-file FILE-SECTION)
Documentation
Toggle the whole-file selection represented by FILE-SECTION.
Source Code
;; Defined in /nix/store/jagqw3nms546pad0gxi5f3wsckk6pji7-emacs-packages-deps/share/emacs/site-lisp/majutsu-interactive.el
(defun majutsu-interactive--toggle-whole-file (file-section)
"Toggle the whole-file selection represented by FILE-SECTION."
(unless (majutsu-interactive--whole-file-selection-allowed-p)
(user-error "Whole-file selections are supported by Split, Squash, and Restore"))
(unless (majutsu-diff-file-metadata file-section)
(user-error
"Cannot verify this whole-file selection against structured metadata from jj; refresh the diff and try again"))
(let* ((id (majutsu-interactive--file-id (oref file-section value)))
(current (majutsu-interactive--get-selection id)))
(majutsu-interactive--set-selection id (unless current :all))
(majutsu-interactive--render-overlays)
(message "%s whole-file change" (if current "Deselected" "Selected"))))