hirc

IRC client
Log | Files | Refs

commit 868961a9a721eeb6d9450a4041301a1eff9d640f
parent a934a93957b390e59cd137bb38a228e74cf6f3db
Author: hhvn <dev@hhvn.uk>
Date:   Sun, 28 Nov 2021 23:19:50 +0000

ui.c config.c: add format.other as default

Diffstat:
Mconfig.c | 5+++++
Mui.c | 4++--
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/config.c b/config.c @@ -199,6 +199,11 @@ struct Config config[] = { .strhandle = config_format, .description = { "Format of messages", NULL}}, + {"format.other", 1, Val_string, + .str = "${raw}", + .strhandle = config_format, + .description = { + "Format of other messages without formats", NULL}}, {NULL}, }; diff --git a/ui.c b/ui.c @@ -728,7 +728,7 @@ ui_hist_print(struct Window *window, int lines, struct History *hist) { return ui_wprintc(window, lines, "%s\n", ui_format(config_gets(formatmap[i].format), hist)); raw: - return ui_wprintc(window, lines, "%s\n", hist->raw); + return ui_wprintc(window, lines, "%s\n", ui_format(config_gets("format.other"), hist)); } int @@ -752,7 +752,7 @@ ui_hist_len(struct Window *window, struct History *hist, int *lines) { return ui_strlenc(window, ui_format(config_gets(formatmap[i].format), hist), lines); raw: - return ui_strlenc(window, hist->raw, lines); + return ui_strlenc(window, ui_format(config_gets("format.other"), hist), lines); } void