New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bracket matching bugs. #4402

Merged
merged 1 commit into from May 9, 2016

Conversation

Projects
None yet
3 participants
@GKFX
Contributor

GKFX commented Apr 11, 2016

Fixes #4397 and makes bracket matching work immediately after changing tabs. (Previously, you had to make an edit after changing tabs for the bracket matchers "offsets" variable to be invalidated.)
Also undoes one line from #4113:

if (offsets == null || offsets.get(offsets.size()-1) >= text.length())

If offsets contains an invalid offset, then there is a bug that needs fixing, because invalidate() hasn't been called when the document changed. So it doesn't make sense to just check for bad offsets and then call parse(), because it's likely that the bug will also manifest itself in other ways.

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry May 8, 2016

Member

@JakubValtar another for you to review.

Member

benfry commented May 8, 2016

@JakubValtar another for you to review.

@JakubValtar

This comment has been minimized.

Show comment
Hide comment
@JakubValtar

JakubValtar May 8, 2016

Contributor

@GKFX Good catch!

@benfry Let's merge this.

Contributor

JakubValtar commented May 8, 2016

@GKFX Good catch!

@benfry Let's merge this.

@benfry benfry merged commit 9a6cd67 into processing:master May 9, 2016

@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry May 9, 2016

Member

Many thanks, fellas.

Member

benfry commented May 9, 2016

Many thanks, fellas.

@GKFX GKFX deleted the GKFX:brackets branch May 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment