From 7e7e455b03c2cb8cfd6d2325465a48406c83a772 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sat, 13 Apr 2024 16:25:19 -0700 Subject: [PATCH] Attempt at spacing out special characters --- src/modal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modal.c b/src/modal.c index bb71d33..c763ae4 100644 --- a/src/modal.c +++ b/src/modal.c @@ -210,7 +210,10 @@ main(int argc, char **argv) if(c == ')' && *(w - 1) == ' ') w--; if(c == ' ' && *(w - 1) == ' ') w--; } - *w++ = c; + if(c == '[' || c == ']' || c == '{' || c == '}') + *w++ = ' ', *w++ = c, *w++ = ' '; + else + *w++ = c; } while(*(--w) <= ' ') *w = 0; fclose(f);