Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editor: 'save as' does not work correctly #11031

Closed
vince-fugnitto opened this issue Apr 14, 2022 · 0 comments · Fixed by #11032
Closed

editor: 'save as' does not work correctly #11031

vince-fugnitto opened this issue Apr 14, 2022 · 0 comments · Fixed by #11032
Labels
bug bugs found in the application editor issues related to the editor

Comments

@vince-fugnitto
Copy link
Member

Bug Description:

There is an issue with the 'save as functionality where:

  • performing save as on an editor does not close the original editor
  • performing save for untitled editors (ultimately a save as) the original untitled editor is preserved
untitled-error.mp4
root WARN TypeError: Cannot read properties of undefined (reading 'create')
    at createTextBuffer (file:///home/evinfug/workspaces/theia/examples/electron/lib/vendors-node_modules_theia_monaco-editor-core_esm_vs_editor_editor_main_js.js:93904:20)
    at TextModel.setValue (file:///home/evinfug/workspaces/theia/examples/electron/lib/vendors-node_modules_theia_monaco-editor-core_esm_vs_editor_editor_main_js.js:94130:44)
    at MonacoEditorModel.applySnapshot (file:///home/evinfug/workspaces/theia/examples/electron/lib/node_modules_theia_monaco-editor-core_esm_vs_base_common_sync_recursive-packages_monaco_lib_b-6d7964.js:565:20)
    at FilesystemSaveResourceService.copyAndSave (file:///home/evinfug/workspaces/theia/examples/electron/lib/packages_filesystem_lib_browser_breadcrumbs_filepath-breadcrumb_js-packages_filesystem_lib_br-eff824.js:842:28)
    at async FilesystemSaveResourceService.saveAs (file:///home/evinfug/workspaces/theia/examples/electron/lib/packages_filesystem_lib_browser_breadcrumbs_filepath-breadcrumb_js-packages_filesystem_lib_br-eff824.js:816:17)
    at async FilesystemSaveResourceService.save (file:///home/evinfug/workspaces/the

Steps to Reproduce:

  1. start the application
  2. execute the command new file - an untitled editor should open
  3. add content to the untitled editor, and save - notice the editor is kept open and dirty with a new editor opened
  4. execute the command save as on a regular editor
  5. after performing the save as the original editor is not replaced with the new one
@vince-fugnitto vince-fugnitto added bug bugs found in the application editor issues related to the editor labels Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application editor issues related to the editor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant