diff --git a/src/pane.coffee b/src/pane.coffee index 6998ad938..763c37519 100644 --- a/src/pane.coffee +++ b/src/pane.coffee @@ -3,6 +3,7 @@ {Model, Sequence} = require 'theorist' Serializable = require 'serializable' PaneAxis = require './pane-axis' +Editor = require './editor' PaneView = null # Public: A container for multiple items, one of which is *active* at a given @@ -91,6 +92,12 @@ class Pane extends Model getActiveItem: -> @activeItem + # Public: Returns an {Editor} if the pane item is an {Editor}, or null + # otherwise. + getActiveEditor: -> + console.log + @activeItem if @activeItem instanceof Editor + # Public: Returns the item at the specified index. itemAtIndex: (index) -> @items[index] diff --git a/src/workspace.coffee b/src/workspace.coffee index d8cd563fa..c123131e7 100644 --- a/src/workspace.coffee +++ b/src/workspace.coffee @@ -155,6 +155,11 @@ class Workspace extends Model destroyActivePane: -> @activePane?.destroy() + # Public: Returns an {Editor} if the active pane item is an {Editor}, + # or null otherwise. + getActiveEditor: -> + @activePane?.getActiveEditor() + increaseFontSize: -> atom.config.set("editor.fontSize", atom.config.get("editor.fontSize") + 1)