jlaurens / synctex

Synchronization for TeX
MIT License
64 stars 19 forks source link

synctex_display_query() returns less result since 1.19 #15

Closed timhoffm closed 6 years ago

timhoffm commented 6 years ago

Using synctex in a pdf viewer for highlighting text. Since version 1.19 synctex_display_query() returns only one result, whereas there have been multiple results in earlier versions.

Example (compiled with recent lualatex from MikTeX):

\documentclass{article}
\usepackage[english]{babel}
\usepackage{lipsum}

\begin{document}

\lipsum[3]

\lipsum[4]

\lipsum[5]

\end{document}

Performing synctex_display_query() on the line \lipsum[3] returns only one result in v1.19/v1.20:

grafik

With version 1.18 there were 11 results:

grafik

Note: Both examples were performed with the same synctex.gz file. Only the client code of the viewer was changed.

jlaurens commented 6 years ago

The filtering algorithm is a bit aggressive Reverted to the 1.18 level. Merged in 2017 master branch