Function: diff-restrict-view
diff-restrict-view is an interactive and byte-compiled function
defined in diff-mode.el.gz.
Signature
(diff-restrict-view &optional ARG)
Documentation
Restrict the view to the current hunk.
If the prefix ARG is given, restrict the view to the current file instead.
Probably introduced at or before Emacs version 22.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/diff-mode.el.gz
(defun diff-restrict-view (&optional arg)
"Restrict the view to the current hunk.
If the prefix ARG is given, restrict the view to the current file instead."
(interactive "P")
(apply #'narrow-to-region
(if arg (diff-bounds-of-file) (diff-bounds-of-hunk)))
(setq-local diff-narrowed-to (if arg 'file 'hunk)))