diff --git a/.travis.yml b/.travis.yml index 62040612a..e127aa499 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,8 @@ +language: python + +python: + - "2.7.13" + git: depth: 10 diff --git a/package.json b/package.json index 2d593741a..a041e606f 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,7 @@ "autocomplete-html": "0.8.4", "autocomplete-plus": "2.39.1", "autocomplete-snippets": "1.11.2", - "autoflow": "0.29.0", + "autoflow": "0.29.1", "autosave": "0.24.6", "background-tips": "0.27.1", "bookmarks": "0.45.1", @@ -110,7 +110,7 @@ "exception-reporting": "0.42.0", "find-and-replace": "0.215.0", "fuzzy-finder": "1.7.4", - "github": "0.9.0", + "github": "0.9.1", "git-diff": "1.3.7", "go-to-line": "0.32.1", "grammar-selector": "0.49.9", @@ -124,8 +124,8 @@ "notifications": "0.70.2", "open-on-github": "1.3.1", "package-generator": "1.3.0", - "settings-view": "0.253.1", - "snippets": "1.1.10", + "settings-view": "0.253.2", + "snippets": "1.1.11", "spell-check": "0.72.4", "status-bar": "1.8.15", "styleguide": "0.49.10", diff --git a/spec/text-editor-spec.js b/spec/text-editor-spec.js index 41a14f76a..89af72137 100644 --- a/spec/text-editor-spec.js +++ b/spec/text-editor-spec.js @@ -86,23 +86,6 @@ describe('TextEditor', () => { }) }) - describe('when the editor is readonly', () => { - it('overrides TextBuffer.isModified to return false', async () => { - const editor = await atom.workspace.open(null, {readOnly: true}) - editor.setText('I am altering the buffer, pray I do not alter it any further') - expect(editor.isModified()).toBe(false) - editor.setReadOnly(false) - expect(editor.isModified()).toBe(true) - }) - it('clears the readonly status when saved', async () => { - const editor = await atom.workspace.open(null, {readOnly: true}) - editor.setText('I am altering the buffer, pray I do not alter it any further') - expect(editor.isReadOnly()).toBe(true) - await editor.saveAs(temp.openSync('was-readonly').path) - expect(editor.isReadOnly()).toBe(false) - }) - }) - describe('.copy()', () => { it('returns a different editor with the same initial state', () => { expect(editor.getAutoHeight()).toBeFalsy() diff --git a/src/text-editor-component.js b/src/text-editor-component.js index 08af5ada1..263556ee0 100644 --- a/src/text-editor-component.js +++ b/src/text-editor-component.js @@ -823,7 +823,7 @@ class TextEditorComponent { const oldClassList = this.classList const newClassList = ['editor'] - if (this.focused && this.isInputEnabled()) newClassList.push('is-focused') + if (this.focused) newClassList.push('is-focused') if (model.isMini()) newClassList.push('mini') for (var i = 0; i < model.selections.length; i++) { if (!model.selections[i].isEmpty()) { diff --git a/src/text-editor.js b/src/text-editor.js index 08d07aa71..6c8f1593f 100644 --- a/src/text-editor.js +++ b/src/text-editor.js @@ -407,7 +407,6 @@ class TextEditor { if (this.component != null) { this.component.scheduleUpdate() } - this.buffer.emitModifiedStatusChanged(this.isModified()) } break @@ -568,11 +567,6 @@ class TextEditor { this.disposables.add(this.buffer.onDidChangeModified(() => { if (!this.hasTerminatedPendingState && this.buffer.isModified()) this.terminatePendingState() })) - this.disposables.add(this.buffer.onDidSave(() => { - if (this.isReadOnly()) { - this.setReadOnly(false) - } - })) } terminatePendingState () { @@ -1129,7 +1123,7 @@ class TextEditor { setEncoding (encoding) { this.buffer.setEncoding(encoding) } // Essential: Returns {Boolean} `true` if this editor has been modified. - isModified () { return this.isReadOnly() ? false : this.buffer.isModified() } + isModified () { return this.buffer.isModified() } // Essential: Returns {Boolean} `true` if this editor has no content. isEmpty () { return this.buffer.isEmpty() }