From 35925ed349d033af688e52793b89939b3955c1ab Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 28 Oct 2014 11:31:17 -0700 Subject: [PATCH] Add encoding getter and setter --- src/text-editor.coffee | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/text-editor.coffee b/src/text-editor.coffee index c8500bb4c..e680fad8e 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -568,6 +568,16 @@ class TextEditor extends Model # Essential: Returns the {String} path of this editor's text buffer. getPath: -> @buffer.getPath() + # Extended: Returns the {String} character set encoding of this editor's text + # buffer. + getEncoding: -> @buffer.getEncoding() + + # Extended: Set the character set encoding to use in this editor's text + # buffer. + # + # * `encoding` The {String} character set encoding name such as 'utf8' + setEncoding: (encoding) -> @buffer.setEncoding(encoding) + # Essential: Returns {Boolean} `true` if this editor has been modified. isModified: -> @buffer.isModified()