tren: fix returning the width of characters not in conf_placeholder - neatvi - … | |
git clone git://src.adamsgaard.dk/neatvi | |
Log | |
Files | |
Refs | |
README | |
--- | |
commit a3b79df332e3c5804ae57c0348549ff35a69f262 | |
parent a361130de2e06249c9bc838a050f09333b0d762d | |
Author: Ali Gholami Rudi <[email protected]> | |
Date: Sun, 7 Mar 2021 20:03:27 +0330 | |
ren: fix returning the width of characters not in conf_placeholder | |
Reported by Kyryl Melekhin <[email protected]>. | |
Diffstat: | |
M ren.c | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/ren.c b/ren.c | |
t@@ -129,11 +129,11 @@ static char *ren_placeholder(char *s, int *wid) | |
{ | |
char *src, *dst; | |
int i; | |
- if (wid) | |
- *wid = 1; | |
for (i = 0; !conf_placeholder(i, &src, &dst, wid); i++) | |
if (src[0] == s[0] && uc_code(src) == uc_code(s)) | |
return dst; | |
+ if (wid) | |
+ *wid = 1; | |
if (uc_iscomb(s)) { | |
static char buf[16]; | |
char cbuf[8] = ""; |