@@ -657,14 +657,13 @@ impl Document {
659 // map state.diagnostics over changes::map_pos too
659 // 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 {
660+ for diagnostic in &mut self.diagnostics {
662− // use helix_core::Assoc;
661+ use helix_core::Assoc;
663− // let changes = transaction.changes();
662+ let changes = transaction.changes();
664− // diagnostic.range.start = changes.map_pos(diagnostic.range.start, Assoc::After);
663+ diagnostic.range.start = changes.map_pos(diagnostic.range.start, Assoc::After);
665− // diagnostic.range.end = changes.map_pos(diagnostic.range.end, Assoc::After);
664+ diagnostic.range.end = changes.map_pos(diagnostic.range.end, Assoc::After);
666− // diagnostic.line = self.text.char_to_line(diagnostic.range.start);
665+ diagnostic.line = self.text.char_to_line(diagnostic.range.start);
669 // emit lsp notification
668 // emit lsp notification
670 if let Some(language_server) = self.language_server() {
669 if let Some(language_server) = self.language_server() {