RSyntaxTextArea icon indicating copy to clipboard operation
RSyntaxTextArea copied to clipboard

Fix WrappedLine calculateLineCount and modelToView when dealing with certain lines containing tabs.

Open mike-smith-portswigger opened this issue 6 years ago • 4 comments

mike-smith-portswigger avatar Sep 09 '19 10:09 mike-smith-portswigger

The existing code for calculateLineCount() and modelToView() would incorrectly update x0 (left offset in pixels) for each physical line, which resulted in tabs being expanded incorrectly. This patch fixes the behaviour. Tests have been added to reproduce the circumstances of this issue and to test the general operation of these methods plus viewToModel().

mike-smith-portswigger avatar Sep 09 '19 10:09 mike-smith-portswigger

@mike-smith-portswigger, any reason you closed this PR?

bobbylight avatar Sep 11 '19 12:09 bobbylight

Hi

After submitting we realised it was dependent on one of the other pull requests we submitted but because that had not yet been accepted some of our tests failed.

If you accept the request concerning a fix to viewToModel for wrapped lines this request will be valid again.

Regards,

Mike

Mike Smith PortSwigger Web Security

On Wed, 11 Sep 2019 at 13:24, bobbylight [email protected] wrote:

@mike-smith-portswigger https://github.com/mike-smith-portswigger, any reason you closed this PR?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bobbylight/RSyntaxTextArea/pull/314?email_source=notifications&email_token=AF4CHSKB64FMFS3QBIMCYWLQJDPRLA5CNFSM4IUZVIP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6OJS7I#issuecomment-530356605, or mute the thread https://github.com/notifications/unsubscribe-auth/AF4CHSIXK6XXDCUMETOX3ADQJDPRLANCNFSM4IUZVIPQ .

mike-smith-portswigger avatar Sep 11 '19 12:09 mike-smith-portswigger

Coverage Status

Coverage increased (+1.1%) to 46.857% when pulling c7f77143dc5533340b07dcbc25ef666c39702efb on PortSwigger:linecountandmodeltoviewfix into 7492e523181a17c209266a22782fc51741db08ca on bobbylight:master.

coveralls avatar Sep 23 '19 09:09 coveralls