Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
# pragma mark Custom caret
- (void)drawInsertionPointInRect:(NSRect)aRect color:(NSColor *)aColor turnedOn:(BOOL)flag {
aRect.size.width = self.caretWidth;
[super drawInsertionPointInRect:aRect color:aColor turnedOn:flag];
}
// This is a hack to get the caret drawing to work. I know, I know.
- (void)setNeedsDisplayInRect:(NSRect)invalidRect {
invalidRect.size.width += self.caretWidth - 1;
[super setNeedsDisplayInRect:invalidRect];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment