]> git.eshelyaron.com Git - emacs.git/commitdiff
lisp/vc/smerge-mode.el (smerge--refine-highlight-change): Fix misalignment
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 26 Jun 2025 16:55:27 +0000 (12:55 -0400)
committerEshel Yaron <me@eshelyaron.com>
Wed, 23 Jul 2025 19:19:23 +0000 (21:19 +0200)
(cherry picked from commit a002ca79ee7f536cb2293af1c7e712a251638fbf)

lisp/vc/smerge-mode.el

index 4b748a2c41e2fb1fa07904a982b1cbde29fff33c..1ddc37d57fe4e8755ae7a98b4fb667e0ffacd3a6 100644 (file)
@@ -1089,10 +1089,14 @@ chars to try and eliminate some spurious differences."
                     (not (memq (car-safe x) '(face font-lock-face))))
                 (overlay-put ol (car x) (cdr x))
               ;; Don't highlight the char we cover artificially.
-              (overlay-put ol (if (= beg olbeg) 'before-string 'after-string)
-                           (propertize
-                            " " (car-safe x) (cdr-safe x)
-                            'display '(space :width 0.5)))))
+              ;; FIXME: We don't want to insert any space because it
+              ;; causes misalignment.  A `:box' face with a line
+              ;; only on one side would be a good solution.
+              ;; (overlay-put ol (if (= beg olbeg) 'before-string 'after-string)
+              ;;              (propertize
+              ;;               " " (car-safe x) (cdr-safe x)
+              ;;               'display '(space :width 0.5)))
+              ))
           ol)))))
 
 (defcustom smerge-refine-shadow-cursor t