You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Failed rustfmt call marks the unedited file as modified #14
When rustfmt fails, the plugin marks the file as modified although nothing changed. Sublime Text build 4215, Windows 11, v0.3.0 (the code is the same on master).
In the failure branch of run_format, self.view.replace(edit, buffer_region, buffer_text) writes the buffer's own text back into itself. Test: a saved, unedited .rs file, ran BeautifyRust with a failing rustfmt call (the --write-mode problem in the v0.3.0 release). Afterwards the tab title had the modified dot, and the window title ended with the dot, with no edits made.
Suggested: remove the replace call; the buffer is not changed by the plugin before the call, so there is nothing to restore. I did not test a patched copy for this one.
Activity