Open wilfredjonathanjames opened 4 years ago
I think it may have to do with these lines: https://github.com/rust-lang/rust.vim/blob/2a6736852cbe64e2883adc70a427cb47cb3305bc/autoload/rustfmt.vim#L147-L148
This is also explains why I don't seem to have this issue with manually running :RustFmt
.
I think I misunderstood the problem this issue is pointing out. The problem I have is that when I undo after saving (and as a result autoformatting), it not only undoes the formatting but also undoes the changes before that.
@NilsIrl I have the same issue. Removing the lines you mention does work, but then undoing the formatting moves the cursor to the end of the file which is quite annoying. It sounds complicated to avoid that.
b7176e7
(5 weeks old), installed with Vundle. Seems to be the latest code change.Steps to reproduce:
let g:rustfmt_autosave = 1
in vimrcu
)C-r
)Expected vs. actual behavior: Step 5 should not show "Already at newest change", and should redo the undone change.