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
It seems to me like content is read from the buffer, then diffed against the file and then changes are applied to the buffer. But if the file doesn't match the buffer, then applying that diff to the buffer doesn't make sense.
That might not be entirely accurate. That is my rough impression of what's happening.
this is reproduced by saving the above content (plus a blank line above it which github leaves out) to hello.erl, and repeatedly formatting it. the buffer ends up having this content after having formatted 3 times:
five() ->five() ->five() ->5.
expected behaviour: format the buffer and ignore the file, formatting again should have no further effect
work-around: save before formatting and only format once, or use other method of formatting
It seems to me like content is read from the buffer, then diffed against the file and then changes are applied to the buffer. But if the file doesn't match the buffer, then applying that diff to the buffer doesn't make sense.
That might not be entirely accurate. That is my rough impression of what's happening.
this is what that looks like: https://asciinema.org/a/ydOkICrct6uhjXTQ3iik5S3cF
this is reproduced by saving the above content (plus a blank line above it which github leaves out) to hello.erl, and repeatedly formatting it. the buffer ends up having this content after having formatted 3 times:
expected behaviour: format the buffer and ignore the file, formatting again should have no further effect
work-around: save before formatting and only format once, or use other method of formatting
Context
erlang_ls
version (tag/sha): 0.46.1 / 1a66e87same thing with vscode and https://marketplace.visualstudio.com/items?itemName=erlang-ls.erlang-ls
The text was updated successfully, but these errors were encountered: