diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 9034ffe..e27b60f 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -1675,7 +1675,11 @@ NOPROMPT, if non-nil, means not to prompt the user." (when (> (prefix-numeric-value other-file) 8) (setq diff-jump-to-old-file other)) (with-current-buffer buf - (goto-char (point-min)) (forward-line (1- (string-to-number line))) + (let ((line-num (string-to-number line))) + ;; When the hunk is pure deletion, line number is off by 1. + (when (string= (if reverse (car old) (car new)) "") + (incf line-num)) + (goto-char (point-min)) (forward-line (1- line-num))) (let* ((orig-pos (point)) (switched nil) ;; FIXME: Check for case where both OLD and NEW are found.