mirror of
https://github.com/weechat/weechat.git
synced 2026-07-10 03:33:12 +02:00
core: add option whitespace in command /debug (closes #947)
New options are added to configure the chars displayed for spaces and tabulations: - weechat.look.whitespace_char: char for spaces - weechat.look.tab_whitespace_char: first char for tabulations
This commit is contained in:
@@ -351,7 +351,14 @@ gui_bar_window_print_string (struct t_gui_bar_window *bar_window,
|
||||
if (utf_char[0] == '\t')
|
||||
{
|
||||
/* expand tabulation with spaces */
|
||||
ptr_char = config_tab_spaces;
|
||||
ptr_char = (gui_chat_whitespace_mode) ?
|
||||
config_tab_spaces_whitespace : config_tab_spaces;
|
||||
}
|
||||
else if ((utf_char[0] == ' ') && gui_chat_whitespace_mode)
|
||||
{
|
||||
/* replace space in whitespace mode */
|
||||
snprintf (utf_char, sizeof (utf_char),
|
||||
"%s", CONFIG_STRING(config_look_whitespace_char));
|
||||
}
|
||||
else if (((unsigned char)utf_char[0]) < 32)
|
||||
{
|
||||
|
||||
@@ -411,7 +411,14 @@ gui_chat_display_word_raw (struct t_gui_window *window, struct t_gui_line *line,
|
||||
if (utf_char[0] == '\t')
|
||||
{
|
||||
/* expand tabulation with spaces */
|
||||
ptr_char = config_tab_spaces;
|
||||
ptr_char = (gui_chat_whitespace_mode) ?
|
||||
config_tab_spaces_whitespace : config_tab_spaces;
|
||||
}
|
||||
else if ((utf_char[0] == ' ') && gui_chat_whitespace_mode)
|
||||
{
|
||||
/* replace space in whitespace mode */
|
||||
snprintf (utf_char, sizeof (utf_char),
|
||||
"%s", CONFIG_STRING(config_look_whitespace_char));
|
||||
}
|
||||
else if (((unsigned char)utf_char[0]) < 32)
|
||||
{
|
||||
|
||||
@@ -60,6 +60,7 @@ struct t_gui_buffer *gui_chat_mute_buffer = NULL; /* mute buffer */
|
||||
int gui_chat_display_tags = 0; /* display tags? */
|
||||
char **gui_chat_lines_waiting_buffer = NULL; /* lines waiting for core */
|
||||
/* buffer */
|
||||
int gui_chat_whitespace_mode = 0; /* make whitespaces visible */
|
||||
|
||||
/* command /pipe */
|
||||
int gui_chat_pipe = 0; /* pipe enabled */
|
||||
|
||||
@@ -80,6 +80,7 @@ extern char gui_chat_prefix_empty[];
|
||||
extern int gui_chat_time_length;
|
||||
extern int gui_chat_mute;
|
||||
extern struct t_gui_buffer *gui_chat_mute_buffer;
|
||||
extern int gui_chat_whitespace_mode;
|
||||
extern int gui_chat_pipe;
|
||||
extern char *gui_chat_pipe_command;
|
||||
extern struct t_gui_buffer *gui_chat_pipe_buffer;
|
||||
|
||||
Reference in New Issue
Block a user