carlthome/vscode-git-line-blame

Format on save bug

carlthome opened this issue · 1 comments

When editor.formatOnSave is enabled, I've noticed that in e.g. a Python script that the currently selected line and its annotation can accidentally end up prepended rather than appended.

When saving the file and having it autoformatted, another line's contents can be repositioned on the currently selected line, in which case this seems to happen:

image

Would be good to re-order the text annotation object creation such that it happens after any auto-formatting has taken place.

Seems to happen for manual document formatting as well (at least with ms-python.black-formatter).