diff options
Diffstat (limited to 'Source/CMTextView.h')
-rw-r--r-- | Source/CMTextView.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/CMTextView.h b/Source/CMTextView.h index ea0b36cc..a7c0ccea 100644 --- a/Source/CMTextView.h +++ b/Source/CMTextView.h @@ -38,6 +38,13 @@ static inline void NSMutableAttributedStringAddAttributeValueRange (NSMutableAtt SPMutableAttributedStringAddAttributeValueRange(self, @selector(addAttribute:value:range:), aStr, aValue, aRange); return; } +static inline id NSMutableAttributedStringAttributeAtIndex (NSMutableAttributedString* self, NSString* aStr, NSUInteger index, NSRangePointer range) { + typedef id (*SPMutableAttributedStringAttributeAtIndexMethodPtr)(NSMutableAttributedString*, SEL, NSString*, NSUInteger, NSRangePointer); + static SPMutableAttributedStringAttributeAtIndexMethodPtr SPMutableAttributedStringAttributeAtIndex; + if (!SPMutableAttributedStringAttributeAtIndex) SPMutableAttributedStringAttributeAtIndex = (SPMutableAttributedStringAttributeAtIndexMethodPtr)[self methodForSelector:@selector(attribute:atIndex:effectiveRange:)]; + id r = SPMutableAttributedStringAttributeAtIndex(self, @selector(attribute:atIndex:effectiveRange:), aStr, index, range); + return r; +} @interface CMTextView : NSTextView { BOOL autoindentEnabled; @@ -49,6 +56,7 @@ static inline void NSMutableAttributedStringAddAttributeValueRange (NSMutableAtt NoodleLineNumberView *lineNumberView; BOOL startListeningToBoundChanges; + BOOL textBufferSizeIncreased; NSString *showMySQLHelpFor; |