Skip to content
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

Important issue: isn't supported multi-line syntax blocks #23

Open
zyavrik opened this issue Jun 12, 2014 · 2 comments
Open

Important issue: isn't supported multi-line syntax blocks #23

zyavrik opened this issue Jun 12, 2014 · 2 comments

Comments

@zyavrik
Copy link

zyavrik commented Jun 12, 2014

Steps to reproduce:

  1. Add regexp pattern for multi-line construction (for example, /* ... */).
  2. Type
    /* line 1
    line2 */

Actual result: Only line 2 will be highlighted.

Should be: Both lines should be highlighted.

Note: Highlighting is correct after keyboard hides.

@zyavrik
Copy link
Author

zyavrik commented Jun 12, 2014

Suggested fix:

-(void)processEditing {
    // performReplacementsForRange doesn't support multi-line blocks, so using update method
    //[self performReplacementsForRange:[self editedRange]];
    [self update];
    [super processEditing];
}

/*- (void)performReplacementsForRange:(NSRange)changedRange {
    NSRange extendedRange = NSUnionRange(changedRange, [[_attributedString string] lineRangeForRange:NSMakeRange(NSMaxRange(changedRange), 0)]);

    [self applyStylesToRange:extendedRange];
}*/

@zyavrik
Copy link
Author

zyavrik commented Jun 12, 2014

Suggested fix causes an issue with jumping cursor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant