mirror of
https://github.com/atom/atom.git
synced 2026-01-25 23:08:18 -05:00
Merge branch 'master' into mb-tree-sitter-parsers
This commit is contained in:
@@ -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()) {
|
||||
|
||||
@@ -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() }
|
||||
|
||||
Reference in New Issue
Block a user