Remove final empty line after formatting
@@ -170,6 +170,9 @@ def apply_TextDocumentEdit(textDocumentEdit: Dict) -> None:
text = buffer[:]
for edit in edits:
text = apply_TextEdit(text, edit)
+ if buffer.options["fixendofline"] and text[-1] == "":
+ buffer[:] = text[:-1]
+ else:
buffer[:] = text
