Diff lines one chunk at a time after discovering indentation

This commit is contained in:
Antonio Scandurra 2023-09-13 11:57:10 +02:00
parent 70c9b8f8fd
commit 127d03516f

View file

@ -225,10 +225,13 @@ impl Codegen {
}
}
if lines.peek().is_some() {
if line_indent.is_some() {
hunks_tx.send(diff.push_new(&new_text)).await?;
hunks_tx.send(diff.push_new("\n")).await?;
new_text.clear();
}
if lines.peek().is_some() {
hunks_tx.send(diff.push_new("\n")).await?;
line_indent = None;
first_line = false;
}