CYRTextView icon indicating copy to clipboard operation
CYRTextView copied to clipboard

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

Open zyavrik opened this issue 11 years ago • 2 comments

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 avatar Jun 12 '14 20:06 zyavrik

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 avatar Jun 12 '14 20:06 zyavrik

Suggested fix causes an issue with jumping cursor.

zyavrik avatar Jun 12 '14 20:06 zyavrik