diff --git a/spec/editor-component-spec.coffee b/spec/editor-component-spec.coffee index da9f5fa5f..1a1d2daa0 100644 --- a/spec/editor-component-spec.coffee +++ b/spec/editor-component-spec.coffee @@ -396,6 +396,14 @@ describe "EditorComponent", -> cursorNode = node.querySelector('.cursor') expect(cursorNode.style['-webkit-transform']).toBe "translate3d(#{10 * editor.getDefaultCharWidth()}px, #{editor.getLineHeightInPixels()}px, 0px)" + it "updates cursor positions when the font family changes", -> + editor.setCursorBufferPosition([1, 10]) + component.setFontFamily('sans-serif') + cursorNode = node.querySelector('.cursor') + + {left} = editor.pixelPositionForScreenPosition([1, 10]) + expect(cursorNode.style['-webkit-transform']).toBe "translate3d(#{left}px, #{editor.getLineHeightInPixels()}px, 0px)" + describe "selection rendering", -> [scrollViewNode, scrollViewClientLeft] = []