forked from mirrors/jj
There are several reasons for this: * We can more easily skip styling a trailing blank line, which other internal code then can correctly detect as having a trailing newline. This fixes the TODO in tests/test_commit_template.rs. * Some tools (like `less -R`) add an extra newline if the final character is not a newline (e.g. if there's a color reset after it), which led to an annoying blank line after the diff summary in e.g. `jj status`. * Since each line is styled independently, you get all the necessary escapes even when grepping through the output. * Some terminals extend background color to the end of the terminal (i.e. past the newline character), which is probably not what the user wanted. * Some tools (like `less -R`) get confused and lose coloring of lines after a newline. |
||
---|---|---|
.. | ||
config | ||
cleanup_guard.rs | ||
cli_util.rs | ||
commands.rs | ||
config-schema.json | ||
config.rs | ||
diff_util.rs | ||
formatter.rs | ||
graphlog.rs | ||
lib.rs | ||
main.rs | ||
merge_tools.rs | ||
progress.rs | ||
template.pest | ||
template_parser.rs | ||
templater.rs | ||
ui.rs |