]> git.eshelyaron.com Git - emacs.git/commit
Speed up xref rendering for matches on very long lines
authorDmitry Gutov <dgutov@yandex.ru>
Mon, 8 Mar 2021 02:25:15 +0000 (04:25 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Mon, 8 Mar 2021 02:25:15 +0000 (04:25 +0200)
commit8e103ebef12bb723723c7e6ec8e1053e86878a5b
treef553abbbcbd46b28e81b5fb3693b49c419e74e1c
parent05adcefa1f615a6e944322755ce35b75c0dfe24d
Speed up xref rendering for matches on very long lines

* lisp/progmodes/xref.el (xref--insert-xrefs): Cut up the current
line into pieces here for multiple matches's summaries, so that
xref--insert-xrefs can do less work (bug#46859).
(xref--insert-xrefs): Do less work.
(xref--outdated-p):
Update accordingly to how the summary creation logic changed.
(xref--buf-pairs-iterator): Update to the new calling convention.
(xref-location-column): Effectively rename back to
xref-file-location-column since the generic version is now unused.

* test/lisp/progmodes/xref-tests.el
(xref-matches-in-directory-finds-two-matches-on-the-same-line)
(xref-matches-in-directory-finds-an-empty-line-regexp-match):
Adjust to the xref-location-column change.
(xref-matches-in-files-trims-summary-for-matches-on-same-line):
New test.

* test/lisp/progmodes/xref-resources/file1.txt:
Change contents slightly to test the new xref--outdated-p code.
lisp/progmodes/xref.el
test/lisp/progmodes/xref-resources/file1.txt
test/lisp/progmodes/xref-resources/file3.txt [new file with mode: 0644]
test/lisp/progmodes/xref-tests.el