summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e81e9c2)
raw | patch | inline | side by side (parent: e81e9c2)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 16 Mar 2008 20:26:56 +0000 (21:26 +0100) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Sun, 16 Mar 2008 20:56:37 +0000 (21:56 +0100) |
Use the setting of the "default" color pair to set the default colors of
the terminal via assume_default_colors(). Fall back to white on black.
With this it is possible to no longer use the terminal colors if
desired.
This was requested by Sebastian Harl as a way to fix Debian bug 399884.
the terminal via assume_default_colors(). Fall back to white on black.
With this it is possible to no longer use the terminal colors if
desired.
This was requested by Sebastian Harl as a way to fix Debian bug 399884.
tig.c | patch | blob | history | |
tigrc.5.txt | patch | blob | history |
index 14f73e62d9dd8db1d0652dfdd58ea7a6152c552e..c6146909a5bbf306cf93612b41b244762237cafd 100644 (file)
--- a/tig.c
+++ b/tig.c
static void
init_colors(void)
{
- int default_bg = COLOR_BLACK;
- int default_fg = COLOR_WHITE;
+ int default_bg = line_info[LINE_DEFAULT].bg;
+ int default_fg = line_info[LINE_DEFAULT].fg;
enum line_type type;
start_color();
- if (use_default_colors() != ERR) {
- default_bg = -1;
- default_fg = -1;
+ if (assume_default_colors(default_fg, default_bg) == ERR) {
+ default_bg = COLOR_BLACK;
+ default_fg = COLOR_WHITE;
}
for (type = 0; type < ARRAY_SIZE(line_info); type++) {
diff --git a/tigrc.5.txt b/tigrc.5.txt
index 5b2843e65dc8eb26ad26e6ca235232a39f08006b..f7d7bed5c20a94702ba4f662fdb0e54ccb9ca76b 100644 (file)
--- a/tigrc.5.txt
+++ b/tigrc.5.txt
Color commands control highlighting and the user interface styles. If your
terminal supports color, these commands can be used to assign foreground and
-background combinations to certain areas. Optionally, an attribute can be given
-as the last parameter. The syntax is:
+background combinations to certain areas. Optionally, an attribute can be
+given as the last parameter. The syntax is:
[verse]
..............................................................................
Examples:
------------------------------------------------------------------------------
+# Overwrite the default terminal colors to white on black.
+color default white black
# Diff colors
color diff-header yellow default
color diff-index blue default
*standout*, and *underline*. Note, not all attributes may be supported
by the terminal.
-
UI colors
~~~~~~~~~
--
+Default terminal colors::
+
+The colors and attributes to be used for the text that is not highlighted or
+that specify the use of the default terminal colors can be controlled by
+setting the *default* color option.
+
+Use the *default* color to use the colors configured for the terminal. This is
+the default and recommended if you are using a terminal with a transparent
+background.
+
Status window colors::
Appearance of the bottom window showing info messages.
Highlighting
~~~~~~~~~~~~
-The colors and attributes for text that is not highlighted can be controlled
-by changing the *default* color option.
-
--
Diff markup::