Page MenuHomePhabricator

Fix an issue where lines with more than one pattern match highlighted improperly in Diffusion
ClosedPublic

Authored by epriestley on Aug 2 2019, 4:42 PM.

Details

Summary

Ref T13339. If a search pattern matches more than once on a line, we currently render the line incorreclty, duplicating some of the text.

substr() is being called as though the third parameter was end_offset, but it's actually length. Correct the parameter.

Test Plan

Before:

After:

Diff Detail

Repository
rP Phabricator
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Aug 2 2019, 4:42 PM
This revision was not accepted when it landed; it landed in state Needs Review.Aug 2 2019, 4:43 PM
epriestley requested review of this revision.
This revision was automatically updated to reflect the committed changes.