]> git.eshelyaron.com Git - emacs.git/commitdiff
(xref--insert-xrefs): Fix printing of line numbers
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 5 Jul 2021 22:55:26 +0000 (01:55 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 5 Jul 2021 22:56:18 +0000 (01:56 +0300)
* lisp/progmodes/xref.el (xref--insert-xrefs):
Fix printing of line numbers when we have multiple files with
(e.g.) single match on the same line.

lisp/progmodes/xref.el

index b7a926f82e0af0fd7b8093879e39b7fbcde4555a..e2cd904a6cde7d245c3ef27bef40800a87d5914d 100644 (file)
@@ -959,7 +959,9 @@ GROUP is a string for decoration purposes and XREF is an
                              (prefix
                               (cond
                                ((not line) "  ")
-                               ((equal line prev-line) "")
+                               ((and (equal line prev-line)
+                                     (equal prev-group group))
+                                "")
                                (t (propertize (format line-format line)
                                               'face 'xref-line-number)))))
                         ;; Render multiple matches on the same line, together.