]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/vc/ediff-util.el (ediff-diff-at-point): Don't assume point-min==1.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 30 Sep 2012 03:28:38 +0000 (23:28 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 30 Sep 2012 03:28:38 +0000 (23:28 -0400)
lisp/ChangeLog
lisp/vc/ediff-util.el

index a0697cdc546b2cd3bfae8d1c2c53e402d850d461..13daa83ac3d40fbc7640f8b1cc33b07515ed90fb 100644 (file)
@@ -1,5 +1,7 @@
 2012-09-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+       * 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
index 78a2163f6536dcc38c04316d863b49d23467049c..86293ade5801c8fcf64c50f36c873e802aec215f 100644 (file)
@@ -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