From 43711d4b0111f97442db6f3ccd79574c21ece81a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 29 Sep 2012 23:28:38 -0400 Subject: [PATCH] * lisp/vc/ediff-util.el (ediff-diff-at-point): Don't assume point-min==1. --- lisp/ChangeLog | 2 ++ lisp/vc/ediff-util.el | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a0697cdc546..13daa83ac3d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2012-09-30 Stefan Monnier + * vc/ediff-util.el (ediff-diff-at-point): Don't assume point-min==1. + * tutorial.el (help-with-tutorial): Use minibuffer-with-setup-hook. * textmodes/text-mode.el (paragraph-indent-minor-mode): Make it diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index 78a2163f653..86293ade580 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -1907,8 +1907,8 @@ in the specified buffer." (cond ((eq which-diff 'after) (1+ diff-no)) ((eq which-diff 'before) diff-no) - ((< (abs (count-lines pos (max 1 prev-end))) - (abs (count-lines pos (max 1 beg)))) + ((< (abs (count-lines pos (max (point-min) prev-end))) + (abs (count-lines pos (max (point-min) beg)))) diff-no) ; choose prev difference (t (1+ diff-no))) ; choose next difference -- 2.39.2