From a83460452e33b147774b80da145de2660f0e0c8f Mon Sep 17 00:00:00 2001 From: Justin Palmer Date: Tue, 15 Jan 2013 16:21:55 -0800 Subject: [PATCH 1/9] add config option for setting the font family --- src/app/editor.coffee | 23 ++++++++++++++++++----- static/editor.css | 2 +- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/app/editor.coffee b/src/app/editor.coffee index 7d4ee0382..74b3e8765 100644 --- a/src/app/editor.coffee +++ b/src/app/editor.coffee @@ -14,6 +14,7 @@ _ = require 'underscore' module.exports = class Editor extends View @configDefaults: + fontFamily: "Inconsolata, Monaco, Courier" fontSize: 20 showInvisibles: false autosave: false @@ -340,6 +341,7 @@ class Editor extends View @observeConfig 'editor.showInvisibles', (showInvisibles) => @setShowInvisibles(showInvisibles) @observeConfig 'editor.invisibles', (invisibles) => @setInvisibles(invisibles) @observeConfig 'editor.fontSize', (fontSize) => @setFontSize(fontSize) + @observeConfig 'editor.fontFamily', (fontFamily) => @setFontFamily(fontFamily) handleEvents: -> @on 'focus', => @@ -683,14 +685,25 @@ class Editor extends View setFontSize: (@fontSize) -> if fontSize? @css('font-size', fontSize + 'px') - return unless @attached - @calculateDimensions() - @updatePaddingOfRenderedLines() - @updateLayerDimensions() - @requestDisplayUpdate() + @redraw() getFontSize: -> @fontSize + setFontFamily: (@fontFamily) -> + if fontFamily? + @css('font-family', fontFamily) + @redraw() + + getFontFamily: -> @fontFamily + + + redraw: -> + return unless @attached + @calculateDimensions() + @updatePaddingOfRenderedLines() + @updateLayerDimensions() + @requestDisplayUpdate() + newSplitEditor: (editSession) -> new Editor { editSession: editSession ? @activeEditSession.copy() } diff --git a/static/editor.css b/static/editor.css index bdd9f2825..0b8cfb452 100644 --- a/static/editor.css +++ b/static/editor.css @@ -103,4 +103,4 @@ position: absolute; pointer-events: none; z-index: -1; -} \ No newline at end of file +} From f138a29a879ffd356419058b1de85c18e40a07bb Mon Sep 17 00:00:00 2001 From: Justin Palmer Date: Tue, 15 Jan 2013 16:23:02 -0800 Subject: [PATCH 2/9] add config option for line height This renames the original lineHeight variable to rowHeight to avoid collision --- src/app/editor.coffee | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/src/app/editor.coffee b/src/app/editor.coffee index 74b3e8765..75396cd2a 100644 --- a/src/app/editor.coffee +++ b/src/app/editor.coffee @@ -16,6 +16,7 @@ class Editor extends View @configDefaults: fontFamily: "Inconsolata, Monaco, Courier" fontSize: 20 + lineHeight: 1.5 showInvisibles: false autosave: false autoIndent: true @@ -308,7 +309,7 @@ class Editor extends View @scrollTop(newScrollTop, adjustVerticalScrollbar: true) getPageRows: -> - Math.max(1, Math.ceil(@scrollView[0].clientHeight / @lineHeight)) + Math.max(1, Math.ceil(@scrollView[0].clientHeight / @rowHeight)) setShowInvisibles: (showInvisibles) -> return if showInvisibles == @showInvisibles @@ -342,6 +343,7 @@ class Editor extends View @observeConfig 'editor.invisibles', (invisibles) => @setInvisibles(invisibles) @observeConfig 'editor.fontSize', (fontSize) => @setFontSize(fontSize) @observeConfig 'editor.fontFamily', (fontFamily) => @setFontFamily(fontFamily) + @observeConfig 'editor.lineHeight', (lineHeight) => @setLineHeight(lineHeight) handleEvents: -> @on 'focus', => @@ -575,7 +577,7 @@ class Editor extends View @scrollTop() + @scrollView.height() scrollToBottom: -> - @scrollBottom(@screenLineCount() * @lineHeight) + @scrollBottom(@screenLineCount() * @rowHeight) scrollToBufferPosition: (bufferPosition, options) -> @scrollToPixelPosition(@pixelPositionForBufferPosition(bufferPosition), options) @@ -597,12 +599,12 @@ class Editor extends View unless scrollTop < pixelPosition.top < scrollBottom @scrollTop(pixelPosition.top - (scrollViewHeight / 2)) else - linesInView = @scrollView.height() / @lineHeight + linesInView = @scrollView.height() / @rowHeight maxScrollMargin = Math.floor((linesInView - 1) / 2) scrollMargin = Math.min(@vScrollMargin, maxScrollMargin) - margin = scrollMargin * @lineHeight + margin = scrollMargin * @rowHeight desiredTop = pixelPosition.top - margin - desiredBottom = pixelPosition.top + @lineHeight + margin + desiredBottom = pixelPosition.top + @rowHeight + margin if desiredBottom > scrollBottom @scrollTop(desiredBottom - scrollViewHeight) else if desiredTop < scrollTop @@ -696,6 +698,12 @@ class Editor extends View getFontFamily: -> @fontFamily + setLineHeight: (@lineHeight) -> + if lineHeight? + @css('line-height', "#{lineHeight}em") + @redraw() + + getLineHeight: -> @lineHeight redraw: -> return unless @attached @@ -798,16 +806,16 @@ class Editor extends View lineRect = fragment[0].getBoundingClientRect() charRect = fragment.find('span')[0].getBoundingClientRect() - @lineHeight = lineRect.height + @rowHeight = lineRect.height @charWidth = charRect.width @charHeight = charRect.height - @height(@lineHeight) if @mini + @height(@rowHeight) if @mini fragment.remove() updateLayerDimensions: -> @gutter.calculateWidth() - height = @lineHeight * @screenLineCount() + height = @rowHeight * @screenLineCount() unless @layerHeight == height @renderedLines.height(height) @underlayer.css('min-height', height) @@ -1015,19 +1023,19 @@ class Editor extends View row++ updatePaddingOfRenderedLines: -> - paddingTop = @firstRenderedScreenRow * @lineHeight + paddingTop = @firstRenderedScreenRow * @rowHeight @renderedLines.css('padding-top', paddingTop) @gutter.lineNumbers.css('padding-top', paddingTop) - paddingBottom = (@getLastScreenRow() - @lastRenderedScreenRow) * @lineHeight + paddingBottom = (@getLastScreenRow() - @lastRenderedScreenRow) * @rowHeight @renderedLines.css('padding-bottom', paddingBottom) @gutter.lineNumbers.css('padding-bottom', paddingBottom) getFirstVisibleScreenRow: -> - Math.floor(@scrollTop() / @lineHeight) + Math.floor(@scrollTop() / @rowHeight) getLastVisibleScreenRow: -> - Math.max(0, Math.ceil((@scrollTop() + @scrollView.height()) / @lineHeight) - 1) + Math.max(0, Math.ceil((@scrollTop() + @scrollView.height()) / @rowHeight) - 1) isScreenRowVisible: (row) -> @getFirstVisibleScreenRow() <= row <= @getLastVisibleScreenRow() @@ -1126,7 +1134,7 @@ class Editor extends View pixelPositionForScreenPosition: (position) -> position = Point.fromObject(position) - { top: position.row * @lineHeight, left: position.column * @charWidth } + { top: position.row * @rowHeight, left: position.column * @charWidth } pixelOffsetForScreenPosition: (position) -> {top, left} = @pixelPositionForScreenPosition(position) @@ -1134,7 +1142,7 @@ class Editor extends View {top: top + offset.top, left: left + offset.left} screenPositionFromPixelPosition: ({top, left}) -> - screenPosition = new Point(Math.floor(top / @lineHeight), Math.floor(left / @charWidth)) + screenPosition = new Point(Math.floor(top / @rowHeight), Math.floor(left / @charWidth)) screenPositionFromMouseEvent: (e) -> { pageX, pageY } = e From e17387e7f0f6f6279286fefda72ea1b90409a23c Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Thu, 24 Jan 2013 11:36:25 -0800 Subject: [PATCH 3/9] Remove lineHeight example from docs --- docs/configuring-and-extending.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/configuring-and-extending.md b/docs/configuring-and-extending.md index 7ecd60a04..35ece3c59 100644 --- a/docs/configuring-and-extending.md +++ b/docs/configuring-and-extending.md @@ -55,8 +55,8 @@ Or you can use `observeConfig` to track changes from a view object. ```coffeescript class MyView extends View initialize: -> - @observeConfig 'editor.lineHeight', (lineHeight) => - @adjustLineHeight(lineHeight) + @observeConfig 'editor.fontSize', () => + @adjustFontSize() ``` The `observeConfig` method will call the given callback immediately with the From 129b574df4f44650c928d9e250e9b3d29127128d Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Thu, 24 Jan 2013 11:37:23 -0800 Subject: [PATCH 4/9] Remove lineHeight config option and rename @rowHeight back to @lineHeight --- src/app/editor.coffee | 37 ++++++++++++++----------------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/src/app/editor.coffee b/src/app/editor.coffee index 75396cd2a..875e4163a 100644 --- a/src/app/editor.coffee +++ b/src/app/editor.coffee @@ -16,7 +16,6 @@ class Editor extends View @configDefaults: fontFamily: "Inconsolata, Monaco, Courier" fontSize: 20 - lineHeight: 1.5 showInvisibles: false autosave: false autoIndent: true @@ -309,7 +308,7 @@ class Editor extends View @scrollTop(newScrollTop, adjustVerticalScrollbar: true) getPageRows: -> - Math.max(1, Math.ceil(@scrollView[0].clientHeight / @rowHeight)) + Math.max(1, Math.ceil(@scrollView[0].clientHeight / @lineHeight)) setShowInvisibles: (showInvisibles) -> return if showInvisibles == @showInvisibles @@ -343,7 +342,6 @@ class Editor extends View @observeConfig 'editor.invisibles', (invisibles) => @setInvisibles(invisibles) @observeConfig 'editor.fontSize', (fontSize) => @setFontSize(fontSize) @observeConfig 'editor.fontFamily', (fontFamily) => @setFontFamily(fontFamily) - @observeConfig 'editor.lineHeight', (lineHeight) => @setLineHeight(lineHeight) handleEvents: -> @on 'focus', => @@ -577,7 +575,7 @@ class Editor extends View @scrollTop() + @scrollView.height() scrollToBottom: -> - @scrollBottom(@screenLineCount() * @rowHeight) + @scrollBottom(@screenLineCount() * @lineHeight) scrollToBufferPosition: (bufferPosition, options) -> @scrollToPixelPosition(@pixelPositionForBufferPosition(bufferPosition), options) @@ -599,12 +597,12 @@ class Editor extends View unless scrollTop < pixelPosition.top < scrollBottom @scrollTop(pixelPosition.top - (scrollViewHeight / 2)) else - linesInView = @scrollView.height() / @rowHeight + linesInView = @scrollView.height() / @lineHeight maxScrollMargin = Math.floor((linesInView - 1) / 2) scrollMargin = Math.min(@vScrollMargin, maxScrollMargin) - margin = scrollMargin * @rowHeight + margin = scrollMargin * @lineHeight desiredTop = pixelPosition.top - margin - desiredBottom = pixelPosition.top + @rowHeight + margin + desiredBottom = pixelPosition.top + @lineHeight + margin if desiredBottom > scrollBottom @scrollTop(desiredBottom - scrollViewHeight) else if desiredTop < scrollTop @@ -698,13 +696,6 @@ class Editor extends View getFontFamily: -> @fontFamily - setLineHeight: (@lineHeight) -> - if lineHeight? - @css('line-height', "#{lineHeight}em") - @redraw() - - getLineHeight: -> @lineHeight - redraw: -> return unless @attached @calculateDimensions() @@ -806,16 +797,16 @@ class Editor extends View lineRect = fragment[0].getBoundingClientRect() charRect = fragment.find('span')[0].getBoundingClientRect() - @rowHeight = lineRect.height + @lineHeight = lineRect.height @charWidth = charRect.width @charHeight = charRect.height - @height(@rowHeight) if @mini + @height(@lineHeight) if @mini fragment.remove() updateLayerDimensions: -> @gutter.calculateWidth() - height = @rowHeight * @screenLineCount() + height = @lineHeight * @screenLineCount() unless @layerHeight == height @renderedLines.height(height) @underlayer.css('min-height', height) @@ -1023,19 +1014,19 @@ class Editor extends View row++ updatePaddingOfRenderedLines: -> - paddingTop = @firstRenderedScreenRow * @rowHeight + paddingTop = @firstRenderedScreenRow * @lineHeight @renderedLines.css('padding-top', paddingTop) @gutter.lineNumbers.css('padding-top', paddingTop) - paddingBottom = (@getLastScreenRow() - @lastRenderedScreenRow) * @rowHeight + paddingBottom = (@getLastScreenRow() - @lastRenderedScreenRow) * @lineHeight @renderedLines.css('padding-bottom', paddingBottom) @gutter.lineNumbers.css('padding-bottom', paddingBottom) getFirstVisibleScreenRow: -> - Math.floor(@scrollTop() / @rowHeight) + Math.floor(@scrollTop() / @lineHeight) getLastVisibleScreenRow: -> - Math.max(0, Math.ceil((@scrollTop() + @scrollView.height()) / @rowHeight) - 1) + Math.max(0, Math.ceil((@scrollTop() + @scrollView.height()) / @lineHeight) - 1) isScreenRowVisible: (row) -> @getFirstVisibleScreenRow() <= row <= @getLastVisibleScreenRow() @@ -1134,7 +1125,7 @@ class Editor extends View pixelPositionForScreenPosition: (position) -> position = Point.fromObject(position) - { top: position.row * @rowHeight, left: position.column * @charWidth } + { top: position.row * @lineHeight, left: position.column * @charWidth } pixelOffsetForScreenPosition: (position) -> {top, left} = @pixelPositionForScreenPosition(position) @@ -1142,7 +1133,7 @@ class Editor extends View {top: top + offset.top, left: left + offset.left} screenPositionFromPixelPosition: ({top, left}) -> - screenPosition = new Point(Math.floor(top / @rowHeight), Math.floor(left / @charWidth)) + screenPosition = new Point(Math.floor(top / @lineHeight), Math.floor(left / @charWidth)) screenPositionFromMouseEvent: (e) -> { pageX, pageY } = e From e7c3282f53ec3bd92894cbbed871bf0d5db4f321 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Wed, 30 Jan 2013 10:15:34 -0800 Subject: [PATCH 5/9] Add font-family spec --- spec/app/editor-spec.coffee | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/spec/app/editor-spec.coffee b/spec/app/editor-spec.coffee index 9dcffb4cf..2660b14fa 100644 --- a/spec/app/editor-spec.coffee +++ b/spec/app/editor-spec.coffee @@ -516,6 +516,30 @@ describe "Editor", -> editor.getBuffer().saveAs(path) expect(editor.getGrammar().name).toBe 'Plain Text' + describe "font family", -> + beforeEach -> + expect(editor.css('font-family')).not.toBe 'monaco' + + it "sets the initial font family based on the value from config", -> + config.set("editor.fontFamily", "monaco") + newEditor = editor.splitRight() + expect(editor.css('font-family')).toBe 'monaco' + expect(newEditor.css('font-family')).toBe 'monaco' + + describe "when the font family changes on the view", -> + it "updates the font family of editors and recalculates dimensions critical to cursor positioning", -> + rootView.attachToDom() + rootView.height(200) + rootView.width(200) + + lineHeightBefore = editor.lineHeight + charWidthBefore = editor.charWidth + editor.setCursorScreenPosition [5, 6] + config.set("editor.fontFamily", "monaco") + expect(editor.charWidth).not.toBe charWidthBefore + expect(editor.getCursorView().position()).toEqual { top: 5 * editor.lineHeight, left: 6 * editor.charWidth } + expect(editor.verticalScrollbarContent.height()).toBe buffer.getLineCount() * editor.lineHeight + describe "font size", -> it "sets the initial font size based on the value from config", -> config.set("editor.fontSize", 20) From 9ea29b2899884fa8be2603a32ad584347535e3c4 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Wed, 30 Jan 2013 10:29:17 -0800 Subject: [PATCH 6/9] Set font-family css property using style tag --- spec/app/editor-spec.coffee | 24 +++++++++++++++++------- src/app/editor.coffee | 11 ++++++++--- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/spec/app/editor-spec.coffee b/spec/app/editor-spec.coffee index 2660b14fa..eb7494738 100644 --- a/spec/app/editor-spec.coffee +++ b/spec/app/editor-spec.coffee @@ -518,15 +518,25 @@ describe "Editor", -> describe "font family", -> beforeEach -> - expect(editor.css('font-family')).not.toBe 'monaco' + expect(editor.css('font-family')).not.toBe 'Courier' it "sets the initial font family based on the value from config", -> - config.set("editor.fontFamily", "monaco") - newEditor = editor.splitRight() - expect(editor.css('font-family')).toBe 'monaco' - expect(newEditor.css('font-family')).toBe 'monaco' + expect($("head style.font-family")).toExist() + expect($("head style.font-family").text()).toMatch "{font-family: #{config.get('editor.fontFamily')}}" + + describe "when the font family changes", -> + it "updates the font family on new and existing editors", -> + rootView.attachToDom() + rootView.height(200) + rootView.width(200) + + config.set("editor.fontFamily", "Courier") + newEditor = editor.splitRight() + + expect($("head style.font-family").text()).toMatch "{font-family: Courier}" + expect(editor.css('font-family')).toBe 'Courier' + expect(newEditor.css('font-family')).toBe 'Courier' - describe "when the font family changes on the view", -> it "updates the font family of editors and recalculates dimensions critical to cursor positioning", -> rootView.attachToDom() rootView.height(200) @@ -534,8 +544,8 @@ describe "Editor", -> lineHeightBefore = editor.lineHeight charWidthBefore = editor.charWidth + config.set("editor.fontFamily", "Courier") editor.setCursorScreenPosition [5, 6] - config.set("editor.fontFamily", "monaco") expect(editor.charWidth).not.toBe charWidthBefore expect(editor.getCursorView().position()).toEqual { top: 5 * editor.lineHeight, left: 6 * editor.charWidth } expect(editor.verticalScrollbarContent.height()).toBe buffer.getLineCount() * editor.lineHeight diff --git a/src/app/editor.coffee b/src/app/editor.coffee index 875e4163a..a45e1c636 100644 --- a/src/app/editor.coffee +++ b/src/app/editor.coffee @@ -690,9 +690,14 @@ class Editor extends View getFontSize: -> @fontSize setFontFamily: (@fontFamily) -> - if fontFamily? - @css('font-family', fontFamily) - @redraw() + headTag = $("head") + styleTag = headTag.find("style.font-family") + if styleTag.length == 0 + styleTag = $$ -> @style class: 'font-family' + headTag.append styleTag + + styleTag.text(".editor {font-family: #{@fontFamily}}") + @redraw() getFontFamily: -> @fontFamily From 29ccd271de3424e854f201f2a1cf35f83c605cd2 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Wed, 30 Jan 2013 12:11:17 -0800 Subject: [PATCH 7/9] Set font-size css property using style tag --- spec/app/editor-spec.coffee | 25 +++++++++++++++++++------ src/app/editor.coffee | 11 ++++++++--- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/spec/app/editor-spec.coffee b/spec/app/editor-spec.coffee index eb7494738..8a9811704 100644 --- a/spec/app/editor-spec.coffee +++ b/spec/app/editor-spec.coffee @@ -551,13 +551,26 @@ describe "Editor", -> expect(editor.verticalScrollbarContent.height()).toBe buffer.getLineCount() * editor.lineHeight describe "font size", -> - it "sets the initial font size based on the value from config", -> - config.set("editor.fontSize", 20) - newEditor = editor.splitRight() - expect(editor.css('font-size')).toBe '20px' - expect(newEditor.css('font-size')).toBe '20px' + beforeEach -> + expect(editor.css('font-size')).not.toBe "20px" + + it "sets the initial font size based on the value from config", -> + expect($("head style.font-size")).toExist() + expect($("head style.font-size").text()).toMatch "{font-size: #{config.get('editor.fontSize')}px}" + + describe "when the font size changes", -> + it "updates the font family on new and existing editors", -> + rootView.attachToDom() + rootView.height(200) + rootView.width(200) + + config.set("editor.fontSize", 20) + newEditor = editor.splitRight() + + expect($("head style.font-size").text()).toMatch "{font-size: 20px}" + expect(editor.css('font-size')).toBe '20px' + expect(newEditor.css('font-size')).toBe '20px' - describe "when the font size changes on the view", -> it "updates the font sizes of editors and recalculates dimensions critical to cursor positioning", -> rootView.attachToDom() rootView.height(200) diff --git a/src/app/editor.coffee b/src/app/editor.coffee index a45e1c636..a4dd22579 100644 --- a/src/app/editor.coffee +++ b/src/app/editor.coffee @@ -683,9 +683,14 @@ class Editor extends View @save() if @getPath()? setFontSize: (@fontSize) -> - if fontSize? - @css('font-size', fontSize + 'px') - @redraw() + headTag = $("head") + styleTag = headTag.find("style.font-size") + if styleTag.length == 0 + styleTag = $$ -> @style class: 'font-size' + headTag.append styleTag + + styleTag.text(".editor {font-size: #{@fontSize}px}") + @redraw() getFontSize: -> @fontSize From 9b1cb29e1f693aed0aad3e287bd9631f4ee0ae5c Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Wed, 30 Jan 2013 12:13:20 -0800 Subject: [PATCH 8/9] Don't store fontSize and fontFamily as instance variables --- spec/app/root-view-spec.coffee | 2 +- src/app/editor.coffee | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/spec/app/root-view-spec.coffee b/spec/app/root-view-spec.coffee index 20b5bca36..b046bef30 100644 --- a/spec/app/root-view-spec.coffee +++ b/spec/app/root-view-spec.coffee @@ -567,9 +567,9 @@ describe "RootView", -> editor = null beforeEach -> editor = rootView.getActiveEditor() + editor.attachToDom() it "increases/decreases font size when increase/decrease-font-size events are triggered", -> - editor = rootView.getActiveEditor() fontSizeBefore = editor.getFontSize() rootView.trigger 'window:increase-font-size' expect(editor.getFontSize()).toBe fontSizeBefore + 1 diff --git a/src/app/editor.coffee b/src/app/editor.coffee index a4dd22579..47517e043 100644 --- a/src/app/editor.coffee +++ b/src/app/editor.coffee @@ -682,29 +682,30 @@ class Editor extends View autosave: -> @save() if @getPath()? - setFontSize: (@fontSize) -> + setFontSize: (fontSize) -> headTag = $("head") styleTag = headTag.find("style.font-size") if styleTag.length == 0 styleTag = $$ -> @style class: 'font-size' headTag.append styleTag - styleTag.text(".editor {font-size: #{@fontSize}px}") + styleTag.text(".editor {font-size: #{fontSize}px}") @redraw() - getFontSize: -> @fontSize + getFontSize: -> + parseInt(@css("font-size")) - setFontFamily: (@fontFamily) -> + setFontFamily: (fontFamily) -> headTag = $("head") styleTag = headTag.find("style.font-family") if styleTag.length == 0 styleTag = $$ -> @style class: 'font-family' headTag.append styleTag - styleTag.text(".editor {font-family: #{@fontFamily}}") + styleTag.text(".editor {font-family: #{fontFamily}}") @redraw() - getFontFamily: -> @fontFamily + getFontFamily: -> @css("font-family") redraw: -> return unless @attached From 74cec989bb558e2d15b229e43971f98dfe2169a7 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Wed, 30 Jan 2013 13:19:09 -0800 Subject: [PATCH 9/9] Use getFontSize() --- src/packages/command-panel/src/command-panel-view.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packages/command-panel/src/command-panel-view.coffee b/src/packages/command-panel/src/command-panel-view.coffee index 7ccb74a48..d27711a70 100644 --- a/src/packages/command-panel/src/command-panel-view.coffee +++ b/src/packages/command-panel/src/command-panel-view.coffee @@ -51,7 +51,7 @@ class CommandPanelView extends View @previewList.hide() @previewCount.hide() @errorMessages.hide() - @prompt.iconSize(@miniEditor.fontSize) + @prompt.iconSize(@miniEditor.getFontSize()) serialize: -> text: @miniEditor.getText()