Skip to content

Commit

Permalink
Redetect indent and line endings after language server replaces docum…
Browse files Browse the repository at this point in the history
…ents (#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 764d14f.
  • Loading branch information
farwyler authored Jun 24, 2022
1 parent c107f4e commit 886cff3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2343,6 +2343,7 @@ async fn make_format_callback(
if doc.version() == doc_version {
doc.apply(&Transaction::from(format), view_id);
doc.append_changes_to_history(view_id);
doc.detect_indent_and_line_ending();
if let Modified::SetUnmodified = modified {
doc.reset_modified();
}
Expand Down

0 comments on commit 886cff3

Please sign in to comment.