forked from mirrors/jj
cli: don't lose short runs of context lines in diffs
If the context was 3 lines or less, it would get lost before this patch.
This commit is contained in:
parent
d7395cc34a
commit
e1ccdcffb7
1 changed files with 1 additions and 1 deletions
|
@ -697,7 +697,7 @@ fn print_diff(left: &[u8], right: &[u8], styler: &mut dyn Styler) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if context_before {
|
||||
if context_before || context.len() < num_context_lines {
|
||||
for line in &context {
|
||||
print_diff_line(styler, line);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue