carlthome / vscode-git-line-blame

Display inline information of the last commit that edited the currently selected line in the editor
https://marketplace.visualstudio.com/items?itemName=carlthome.git-line-blame
GNU Affero General Public License v3.0
21 stars 5 forks source link

Format on save bug #17

Closed carlthome closed 9 months ago

carlthome commented 10 months ago

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.

carlthome commented 10 months ago

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