Browse Source
color_output() takes a "type" parameter, which is either '3' or '4', and that byte is shown in front of '0'-'7' to form "30"-"37" or "40"-"47" in ANSI output mode for fore-ground and back-ground colors. Clarify the purpose of the parameter by renaming it to the "background" that is a boolean. Also, change the .value field in the color struct from storing 0-7 for basic 8 colors to storing 30-37 for ANSI colors. This aligns the code to show ANSI colors to the code for the 256 color scheme, which already uses the actual value to be sent to the terminal. Signed-off-by: Eyal Soha <shawarmakarma@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
Eyal Soha
5 years ago
committed by
Junio C Hamano
1 changed files with 21 additions and 13 deletions
Loading…
Reference in new issue