<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Dear Wojtek,<br>
<br>
<div class="moz-cite-prefix">On 21.02.22 22:45, Wojciech Myszka
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CALa+_bVqqiervbdxTpqgdY90JRzZ+CQ5avYghRni8eM9U-VATw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<p style="color:rgb(0,0,0);font-family:"Times New
Roman";font-size:medium">There is something wrong with
“Search all open files” operation.</p>
<ol style="color:rgb(0,0,0);font-family:"Times New
Roman";font-size:medium">
<li>I have created three identical files (let's say
a[123].tex) containing the first five paragraphs of lorem
ipsum taken from <a href="https://lipsum.com/"
moz-do-not-send="true">lipsum.com</a>.</li>
<li>The first search for the word “Cras” gives the correct
result: lines no. 1, 5, and 9 (three times) in each file.</li>
<li>Starting the search in the first file (a1.tex) <strong>after
deletion</strong> of the last paragraph (now a1.tex is
shorter, a2.tex and a3.tex are identical) searching for
“Cras” gives incorrect results (the word is found only <strong>two
times</strong> in each file — in lines 1 and 5)</li>
<li>Starting the search from a2.tex (or a3) — results are
correct (two times in a1, four times in a2 and a3)</li>
</ol>
<p style="color:rgb(0,0,0);font-family:"Times New
Roman";font-size:medium">I do not know if I can explain
this correctly.</p>
</div>
</blockquote>
<br>
I could reproduce it so they explanation was good :). Thanks a lot
for spotting this. It should be fixed in the code now (automated
builds are running and should hopefully complete in the next couple
of minutes).<br>
<br>
<blockquote type="cite"
cite="mid:CALa+_bVqqiervbdxTpqgdY90JRzZ+CQ5avYghRni8eM9U-VATw@mail.gmail.com">
<div dir="ltr">
<p style="color:rgb(0,0,0);font-family:"Times New
Roman";font-size:medium">There is also another problem
with searching through all open files, difficult to explain
and describe:</p>
<ul style="color:rgb(0,0,0);font-family:"Times New
Roman";font-size:medium">
<li>starting the search from the file where the search string
is absent gives a result <strong>not found</strong></li>
<li>starting from the file where the search string is present
gives <strong>correct</strong> results for this file and <strong>wrong</strong> results
for other files (please check the attachment, where each
“found place” is marked blue; the search word was
“\\section”); well, OK—I really do not know when the problem
appears for the first time, but it used to work earlier.</li>
</ul>
</div>
</blockquote>
<br>
This is in fact the same problem. Essentially, instead of searching
all open files, the code searched the same (current) file over and
over again, just reporting the results (or lack thereof) as if they
were coming from all the other open documents.<br>
And you are right, the bug seems to have been introduced back in
June 2021 in the course of some refactoring.<br>
<br>
Best regards,<br>
Stefan<br>
</body>
</html>