From 6ec3cf1ccb5380acc376e89140b8d3a7fa4e471a Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Tue, 6 Jul 2021 01:55:26 +0300 Subject: [PATCH] (xref--insert-xrefs): Fix printing of line numbers * 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index b7a926f82e0..e2cd904a6cd 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -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. -- 2.39.2