hirc

IRC client
Log | Files | Refs

commit 983644d22ecffbe26f5c9aaf146546d59b335c40
parent a8fa163c879db68f261d3ff072e74cecc5a0e304
Author: hhvn <dev@hhvn.uk>
Date:   Fri,  4 Mar 2022 17:09:57 +0000

Escape %{...} and ${...} without printing \

Diffstat:
Msrc/ui.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/ui.c b/src/ui.c @@ -1568,6 +1568,9 @@ ui_format(struct Window *window, char *format, struct History *hist) { continue; } + if (escape && (*format == '%' || *format == '$') && *(format+1) == '{' && strchr(format, '}')) + escape = 0; + if (escape) { ret[rc++] = '\\'; escape = 0;