While making the default insertion caret pop a little wider for better accessibility, I ran into an issue where the insertion point ghosted on arrow key presses. Christian Tietze observed the same issue.
My culprit was settings an x offset for the rect inside drawInsertionPoint
. While Christian's blog code doesn't include an offset, there's otherwise no difference in our approach.
Below draws wider insertion caret with rounded corners.
class FatRoundInsertionCaretTextView: NSTextView {