From b1271558058ebfdabb9bee058519878eb4e4a0a0 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 24 Jun 2014 13:26:21 -0600 Subject: [PATCH] Only pause cursor blink when cursors actually move Not when they are just repositioned due to lineHeight/charWidth changes --- src/cursors-component.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cursors-component.coffee b/src/cursors-component.coffee index 1d0c4366e..a1e541bfb 100644 --- a/src/cursors-component.coffee +++ b/src/cursors-component.coffee @@ -37,7 +37,11 @@ CursorsComponent = React.createClass not isEqualForProperties(newProps, @props, 'cursorPixelRects', 'scrollTop', 'scrollLeft', 'defaultCharWidth') componentWillUpdate: (newProps) -> - @pauseCursorBlinking() if @props.cursorPixelRects? and not isEqual(newProps.cursorPixelRects, @props.cursorPixelRects) + cursorsMoved = @props.cursorPixelRects? and + isEqualForProperties(newProps, @props, 'defaultCharWidth', 'scopedCharacterWidthsChangeCount') and + not isEqual(newProps.cursorPixelRects, @props.cursorPixelRects) + + @pauseCursorBlinking() if cursorsMoved startBlinkingCursors: -> @toggleCursorBlinkHandle = setInterval(@toggleCursorBlink, @props.cursorBlinkPeriod / 2) if @isMounted()