mirror of https://github.com/helix-editor/helix
Redetect indent and line endings after language server replaces documents (#2778)
* redetect indent and line endings after language server replaces document * removes nested if * always redetect indent and line endings after format This reverts commit 764d14f55894dc7213e48022dfa0f91829b8ef59.pull/2872/head
parent
c107f4ea49
commit
886cff3bcc
|
@ -2343,6 +2343,7 @@ async fn make_format_callback(
|
||||||
if doc.version() == doc_version {
|
if doc.version() == doc_version {
|
||||||
doc.apply(&Transaction::from(format), view_id);
|
doc.apply(&Transaction::from(format), view_id);
|
||||||
doc.append_changes_to_history(view_id);
|
doc.append_changes_to_history(view_id);
|
||||||
|
doc.detect_indent_and_line_ending();
|
||||||
if let Modified::SetUnmodified = modified {
|
if let Modified::SetUnmodified = modified {
|
||||||
doc.reset_modified();
|
doc.reset_modified();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue