Assign a language mode in text editor component specs

This commit is contained in:
Max Brunsfeld
2017-11-03 15:08:02 -07:00
parent bfffde9a76
commit e6c3891e62

View File

@@ -4478,6 +4478,7 @@ function buildEditor (params = {}) {
for (const paramName of ['mini', 'autoHeight', 'autoWidth', 'lineNumberGutterVisible', 'showLineNumbers', 'placeholderText', 'softWrapped', 'scrollSensitivity']) {
if (params[paramName] != null) editorParams[paramName] = params[paramName]
}
atom.grammars.assignLanguageModeToBuffer(buffer)
const editor = new TextEditor(editorParams)
editor.testAutoscrollRequests = []
editor.onDidRequestAutoscroll((request) => { editor.testAutoscrollRequests.push(request) })