@@ -657,14 +657,13 @@ impl Document {
657657 }
658658
659659 // map state.diagnostics over changes::map_pos too
660− // NOTE: seems to do nothing since the language server resends diagnostics on each edit
661− // for diagnostic in &mut self.diagnostics {
662− // use helix_core::Assoc;
663− // let changes = transaction.changes();
664− // diagnostic.range.start = changes.map_pos(diagnostic.range.start, Assoc::After);
665− // diagnostic.range.end = changes.map_pos(diagnostic.range.end, Assoc::After);
666− // diagnostic.line = self.text.char_to_line(diagnostic.range.start);
667− // }
660+ for diagnostic in &mut self.diagnostics {
661+ use helix_core::Assoc;
662+ let changes = transaction.changes();
663+ diagnostic.range.start = changes.map_pos(diagnostic.range.start, Assoc::After);
664+ diagnostic.range.end = changes.map_pos(diagnostic.range.end, Assoc::After);
665+ diagnostic.line = self.text.char_to_line(diagnostic.range.start);
666+ }
668667
669668 // emit lsp notification
670669 if let Some(language_server) = self.language_server() {