What happened?
normalizeForFuzzyMatch doesn't collapse runs of whitespace or strip leading whitespace. Edit's oldText fails the fuzzy match when the whitespace isn't exact, even though the content is identical. I found his while looking into some problems small models were having with the edit tool. The same problem can occur with pi -ne and no extensions loaded.
Steps to reproduce
Edit a line where the only difference from oldText is the length of a whitespace section.
Expected behavior
I expected the fuzzy match to catch it and treat whitespace sections as equivalent. So whitespace-only differences would still lead to a match.
Version
0.80.5
NOTE: I investigated this with GLM-5.2 in Pi. Originally it eagerly raised the issue with a freeform issue body and verbose title before I fully reviewed the problem - truly sorry about that!
What happened?
normalizeForFuzzyMatchdoesn't collapse runs of whitespace or strip leading whitespace. Edit'soldTextfails the fuzzy match when the whitespace isn't exact, even though the content is identical. I found his while looking into some problems small models were having with the edit tool. The same problem can occur withpi -neand no extensions loaded.Steps to reproduce
Edit a line where the only difference from
oldTextis the length of a whitespace section.a bvsa bExpected behavior
I expected the fuzzy match to catch it and treat whitespace sections as equivalent. So whitespace-only differences would still lead to a match.
Version
0.80.5
NOTE: I investigated this with GLM-5.2 in Pi. Originally it eagerly raised the issue with a freeform issue body and verbose title before I fully reviewed the problem - truly sorry about that!