Skip to content

Using formatter findent with format code on save produces error "Failed to save" file #364

Closed
@maroony

Description

@maroony

Describe the bug
When using the formatter findent with option "editor.formatOnSave": true, every time I got the following error message:

Failed to save 'file.f90': The content of the file is newer. Please compare your version with the file contents or overwrite the content of the file with your changes.

I do not get this error when using formatter fprettify which is very slow in compare to findent.

To Reproduce
Steps to reproduce the behavior:

  1. Open file.f90
  2. Make a change in this file
  3. Hit key command for saving the file (e. g. Ctrl + S)
  4. Get the error message

Expected behavior
Saved formatted file.

Build info (please complete the following information):

  • Linux x64 (Remote Development)
  • Extension Version 2.6.2
  • Visual Studio Code Version 1.63.2

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions