diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2009-11-23 23:59:46 +0000 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2009-11-23 23:59:46 +0000 |
commit | 513e0ac59bf1b2d381cac2202b45236e7f751c3e (patch) | |
tree | 8b805294cee9627c5ba82075bd3bae3458a1d2f1 /termkey.c | |
parent | 83c7c3f6681d2b7d29dd1f068dbb6700b3af7818 (diff) | |
download | termo-513e0ac59bf1b2d381cac2202b45236e7f751c3e.tar.gz termo-513e0ac59bf1b2d381cac2202b45236e7f751c3e.tar.xz termo-513e0ac59bf1b2d381cac2202b45236e7f751c3e.zip |
Bugfix to termkey_format_key() in FORMAT_CARETCTRL case when formatting Ctrl-Letter
Diffstat (limited to 'termkey.c')
-rw-r--r-- | termkey.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -871,14 +871,14 @@ size_t termkey_snprint_key(TermKey *tk, char *buffer, size_t len, TermKeyKey *ke if(codepoint >= 'a' && codepoint <= 'z') { l = snprintf(buffer + pos, len - pos, wrapbracket ? "<^%c>" : "^%c", (char)codepoint - 0x20); if(l <= 0) return pos; - pos += len; + pos += l; return pos; } else if((codepoint >= '@' && codepoint < 'A') || (codepoint > 'Z' && codepoint <= '_')) { l = snprintf(buffer + pos, len - pos, wrapbracket ? "<^%c>" : "^%c", (char)codepoint); if(l <= 0) return pos; - pos += len; + pos += l; return pos; } } |