Mercurial > emacs
diff lisp/vc/smerge-mode.el @ 111516:80d61d4081a0
* lisp/vc/smerge-mode.el (smerge-refine): Choose better default part to
highlight when one of them is empty.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 12 Nov 2010 08:35:36 -0500 |
parents | d928a6a7c3f2 |
children | 417b1e4d63cd |
line wrap: on
line diff
--- a/lisp/vc/smerge-mode.el Fri Nov 12 08:33:44 2010 -0500 +++ b/lisp/vc/smerge-mode.el Fri Nov 12 08:35:36 2010 -0500 @@ -1009,6 +1009,10 @@ (setq part (cond ((null (match-end 2)) 2) ((eq (match-end 1) (match-end 3)) 1) ((integerp part) part) + ;; If one of the parts is empty, any refinement using + ;; it will be trivial and uninteresting. + ((eq (match-end 1) (match-beginning 1)) 1) + ((eq (match-end 3) (match-beginning 3)) 3) (t 2))) (let ((n1 (if (eq part 1) 2 1)) (n2 (if (eq part 3) 2 3)))