mirror of
https://github.com/moparisthebest/hexchat
synced 2024-08-13 16:53:48 -04:00
Add option to retain colors in scrollback
This commit is contained in:
parent
89584e565a
commit
ef81a24f64
@ -586,6 +586,7 @@ const struct prefs vars[] = {
|
|||||||
{"text_max_indent", P_OFFINT (max_auto_indent), TYPE_INT},
|
{"text_max_indent", P_OFFINT (max_auto_indent), TYPE_INT},
|
||||||
{"text_max_lines", P_OFFINT (max_lines), TYPE_INT},
|
{"text_max_lines", P_OFFINT (max_lines), TYPE_INT},
|
||||||
{"text_replay", P_OFFINT (text_replay), TYPE_BOOL},
|
{"text_replay", P_OFFINT (text_replay), TYPE_BOOL},
|
||||||
|
{"text_replay_strip_color", P_OFFINT (text_replay_strip_color), TYPE_BOOL},
|
||||||
{"text_search_case_match", P_OFFINT (text_search_case_match), TYPE_BOOL},
|
{"text_search_case_match", P_OFFINT (text_search_case_match), TYPE_BOOL},
|
||||||
{"text_search_backward", P_OFFINT (text_search_backward), TYPE_BOOL},
|
{"text_search_backward", P_OFFINT (text_search_backward), TYPE_BOOL},
|
||||||
{"text_search_highlight_all", P_OFFINT (text_search_highlight_all), TYPE_BOOL},
|
{"text_search_highlight_all", P_OFFINT (text_search_highlight_all), TYPE_BOOL},
|
||||||
@ -677,6 +678,7 @@ load_config (void)
|
|||||||
prefs.recon_delay = 10;
|
prefs.recon_delay = 10;
|
||||||
prefs.autocopy_text = 1;
|
prefs.autocopy_text = 1;
|
||||||
prefs.text_replay = 1;
|
prefs.text_replay = 1;
|
||||||
|
prefs.text_replay_strip_color = 1;
|
||||||
prefs.tabchannels = 1;
|
prefs.tabchannels = 1;
|
||||||
prefs.tab_layout = 2; /* 0=Tabs 1=Reserved 2=Tree */
|
prefs.tab_layout = 2; /* 0=Tabs 1=Reserved 2=Tree */
|
||||||
prefs.tab_sort = 1;
|
prefs.tab_sort = 1;
|
||||||
|
@ -338,7 +338,10 @@ scrollback_load (session *sess)
|
|||||||
text = strchr (buf + 3, ' ');
|
text = strchr (buf + 3, ' ');
|
||||||
if (text)
|
if (text)
|
||||||
{
|
{
|
||||||
text = strip_color (text + 1, -1, STRIP_COLOR);
|
if (prefs.text_replay_strip_color)
|
||||||
|
{
|
||||||
|
text = strip_color (text + 1, -1, STRIP_COLOR);
|
||||||
|
}
|
||||||
fe_print_text (sess, text, stamp);
|
fe_print_text (sess, text, stamp);
|
||||||
g_free (text);
|
g_free (text);
|
||||||
}
|
}
|
||||||
@ -373,7 +376,10 @@ scrollback_load (session *sess)
|
|||||||
text = strchr (buf + 3, ' ');
|
text = strchr (buf + 3, ' ');
|
||||||
if (text)
|
if (text)
|
||||||
{
|
{
|
||||||
text = strip_color (text + 1, -1, STRIP_COLOR);
|
if (prefs.text_replay_strip_color)
|
||||||
|
{
|
||||||
|
text = strip_color (text + 1, -1, STRIP_COLOR);
|
||||||
|
}
|
||||||
cleaned_text = text_replace_non_bmp (text, -1, &cleaned_len);
|
cleaned_text = text_replace_non_bmp (text, -1, &cleaned_len);
|
||||||
if (cleaned_text != NULL)
|
if (cleaned_text != NULL)
|
||||||
{
|
{
|
||||||
|
@ -284,6 +284,7 @@ struct xchatprefs
|
|||||||
unsigned int windows_as_tabs;
|
unsigned int windows_as_tabs;
|
||||||
unsigned int indent_nicks;
|
unsigned int indent_nicks;
|
||||||
unsigned int text_replay;
|
unsigned int text_replay;
|
||||||
|
unsigned int text_replay_strip_color;
|
||||||
unsigned int show_marker;
|
unsigned int show_marker;
|
||||||
unsigned int show_separator;
|
unsigned int show_separator;
|
||||||
unsigned int thin_separator;
|
unsigned int thin_separator;
|
||||||
|
@ -446,6 +446,7 @@ static const setting logging_settings[] =
|
|||||||
{
|
{
|
||||||
{ST_HEADER, N_("Logging"),0,0,0},
|
{ST_HEADER, N_("Logging"),0,0,0},
|
||||||
{ST_TOGGLE, N_("Display scrollback from previous session"), P_OFFINTNL(text_replay), 0, 0, 0},
|
{ST_TOGGLE, N_("Display scrollback from previous session"), P_OFFINTNL(text_replay), 0, 0, 0},
|
||||||
|
{ST_TOGGLE, N_("Strip colors when displaying scrollback"), P_OFFINTNL(text_replay_strip_color), 0, 0, 0},
|
||||||
{ST_TOGGLE, N_("Enable logging of conversations to disk"), P_OFFINTNL(logging), 0, 0, 2},
|
{ST_TOGGLE, N_("Enable logging of conversations to disk"), P_OFFINTNL(logging), 0, 0, 2},
|
||||||
{ST_ENTRY, N_("Log filename:"), P_OFFSETNL(logmask), 0, 0, sizeof prefs.logmask},
|
{ST_ENTRY, N_("Log filename:"), P_OFFSETNL(logmask), 0, 0, sizeof prefs.logmask},
|
||||||
{ST_LABEL, N_("%s=Server %c=Channel %n=Network.")},
|
{ST_LABEL, N_("%s=Server %c=Channel %n=Network.")},
|
||||||
|
Loading…
Reference in New Issue
Block a user