diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2021-03-08 04:25:15 +0200 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2021-03-08 04:25:15 +0200 |
commit | 8e103ebef12bb723723c7e6ec8e1053e86878a5b (patch) | |
tree | f553abbbcbd46b28e81b5fb3693b49c419e74e1c /test/lisp/progmodes/xref-resources | |
parent | 05adcefa1f615a6e944322755ce35b75c0dfe24d (diff) | |
download | emacs-8e103ebef12bb723723c7e6ec8e1053e86878a5b.tar.gz emacs-8e103ebef12bb723723c7e6ec8e1053e86878a5b.tar.bz2 emacs-8e103ebef12bb723723c7e6ec8e1053e86878a5b.zip |
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.
Diffstat (limited to 'test/lisp/progmodes/xref-resources')
-rw-r--r-- | test/lisp/progmodes/xref-resources/file1.txt | 2 | ||||
-rw-r--r-- | test/lisp/progmodes/xref-resources/file3.txt | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/test/lisp/progmodes/xref-resources/file1.txt b/test/lisp/progmodes/xref-resources/file1.txt index 5d7cc544443..85b92f11566 100644 --- a/test/lisp/progmodes/xref-resources/file1.txt +++ b/test/lisp/progmodes/xref-resources/file1.txt @@ -1,2 +1,2 @@ -foo foo + foo foo bar diff --git a/test/lisp/progmodes/xref-resources/file3.txt b/test/lisp/progmodes/xref-resources/file3.txt new file mode 100644 index 00000000000..6283185910d --- /dev/null +++ b/test/lisp/progmodes/xref-resources/file3.txt @@ -0,0 +1 @@ + match some words match more match ends here |