hirc

IRC client
Log | Files | Refs

commit 46f9d750c647fa0467a2d3c65fa2b3b6d23ca2d6
parent eb0d2491aad749b774b6d7aebc02f4fd5618b602
Author: hhvn <dev@hhvn.uk>
Date:   Sun, 28 Nov 2021 13:14:16 +0000

config.c: redraw on format change

Diffstat:
Mconfig.c | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/config.c b/config.c @@ -12,6 +12,7 @@ static int config_buflist_location(long num); static int config_buflist_width(long num); static int config_nickcolour_self(long num); static int config_nickcolour_range(long a, long b); +static int config_format(char *str); char *valname[] = { [Val_string] = "a string", @@ -146,12 +147,12 @@ struct Config config[] = { "Message to send on /part", NULL}}, {"format.ui.topic", 1, Val_string, .str = "%{c:99,89}${topic}", - .strhandle = NULL, + .strhandle = config_format, .description = { "Format of topic at top of main window", NULL}}, {"format.privmsg", 1, Val_string, .str = "${nick} ${2}", - .strhandle = NULL, + .strhandle = config_format, .description = { "Format of messages", NULL}}, {NULL}, @@ -419,3 +420,9 @@ config_nickcolour_range(long a, long b) { windows[Win_nicklist].refresh = 1; return 1; } + +static int +config_format(char *str) { + ui_redraw(); + return 1; +}