mirror of
https://github.com/martinvonz/jj.git
synced 2025-05-18 21:54:26 +00:00
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
@ -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…
x
Reference in New Issue
Block a user