Theia: Opening a JSON file in Theia marks the editor dirty

Created on 28 Jun 2018  路  9Comments  路  Source: eclipse-theia/theia

I have "editor.autoSave": "off".
screencast 2018-06-28 10-51-17

bug

All 9 comments

Have you seen any JS errors?

I'm not sure if that's related, but I've seen that for other files very recently. And afterwards, I found the following error logged:

errors.ts:81 Uncaught Error: Cannot read property 'isDisposed' of undefined

TypeError: Cannot read property 'isDisposed' of undefined
    at Function.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorPropertiesMain.getOptionsFromEditor (text-editor-main.ts:364)
    at Function.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorPropertiesMain.readFromEditor (text-editor-main.ts:342)
    at TextEditorMain.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorMain.updateProperties (text-editor-main.ts:56)
    at text-editor-main.ts:94
    at Emitter.fire (event.ts:140)
    at ViewOutgoingEvents.viewEventBus.onDidScroll (codeEditorWidget.ts:433)
    at ViewOutgoingEvents.emitScrollChanged (viewOutgoingEvents.ts:45)
    at View.onScrollChanged (viewImpl.ts:333)
    at ViewEventHandler.handleEvents (viewEventHandler.ts:164)
    at ViewEventDispatcher._doConsumeQueue (viewEventDispatcher.ts:89)
    at Function.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorPropertiesMain.getOptionsFromEditor (text-editor-main.ts:364)
    at Function.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorPropertiesMain.readFromEditor (text-editor-main.ts:342)
    at TextEditorMain.../../packages/plugin-ext/lib/main/browser/text-editor-main.js.TextEditorMain.updateProperties (text-editor-main.ts:56)
    at text-editor-main.ts:94
    at Emitter.fire (event.ts:140)
    at ViewOutgoingEvents.viewEventBus.onDidScroll (codeEditorWidget.ts:433)
    at ViewOutgoingEvents.emitScrollChanged (viewOutgoingEvents.ts:45)
    at View.onScrollChanged (viewImpl.ts:333)
    at ViewEventHandler.handleEvents (viewEventHandler.ts:164)
    at ViewEventDispatcher._doConsumeQueue (viewEventDispatcher.ts:89)
    at errors.ts:81

Have you seen any JS errors?

No.

in my local environment this only happens to the settings.json created from the "Open Workspace Preferences" menu item:

peek 2018-07-05 13-29

It could be some formatter thing.

Could be that editorconfig extension聽adds a new line?

@kittaakos, @akosyakov, that's apparently the case for theia repo:

[*.{json,js,ts,md,yml}]
insert_final_newline = true

why is that modification done for opening of files? that seems bogus to me. while looking for something during a PR review I just tempered lots of files without any intend.

ref. #2667

Can we close this then?

Was this page helpful?
0 / 5 - 0 ratings