mirror of
https://github.com/atom/atom.git
synced 2026-02-12 23:55:10 -05:00
Assign a language mode in text editor component specs
This commit is contained in:
@@ -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) })
|
||||
|
||||
Reference in New Issue
Block a user