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.
Tags
None
Referenced Files
Unknown Object (File)
Oct 23 2024, 4:48 AM
Unknown Object (File)
Oct 15 2024, 5:01 AM
Unknown Object (File)
Oct 8 2024, 7:34 AM
Unknown Object (File)
Sep 25 2024, 5:39 PM
Unknown Object (File)
Sep 9 2024, 11:13 PM
Unknown Object (File)
Aug 28 2024, 9:02 PM
Unknown Object (File)
Aug 22 2024, 2:34 PM
Unknown Object (File)
Jul 27 2024, 6:59 PM
Subscribers
None

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:

Screen Shot 2019-08-02 at 9.40.04 AM.png (201×356 px, 12 KB)

After:

Screen Shot 2019-08-02 at 9.39.54 AM.png (191×349 px, 11 KB)

Diff Detail

Repository
rP Phabricator
Branch
highlight1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 23222
Build 31898: Run Core Tests
Build 31897: arc lint + arc unit

Event Timeline

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.