Bugfix to termkey_format_key() in FORMAT_CARETCTRL case when formatting Ctrl-Letter
This commit is contained in:
parent
83c7c3f668
commit
513e0ac59b
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue