apply patch st-autocomplete-20240703-6508693.diff

This commit is contained in:
elbachir-one
2024-07-03 22:44:40 +01:00
committed by Łukasz Pankowski
parent ede4c6b30c
commit 4cbd7c3898
7 changed files with 579 additions and 0 deletions

9
x.c
View File

@@ -1867,11 +1867,20 @@ kpress(XEvent *ev)
/* 1. shortcuts */
for (bp = shortcuts; bp < shortcuts + LEN(shortcuts); bp++) {
if (ksym == bp->keysym && match(bp->mod, e->state)) {
if (bp -> func != autocomplete)
autocomplete ((const Arg []) { ACMPL_DEACTIVATE });
bp->func(&(bp->arg));
return;
}
}
if (!(
len == 0 &&
e -> state & ~ignoremod // ACMPL_ISSUE: I'm not sure that this is the right way
| ACMPL_MOD == ACMPL_MOD
))
autocomplete ((const Arg []) { ACMPL_DEACTIVATE });
/* 2. custom keys from config.h */
if ((customkey = kmap(ksym, e->state))) {
ttywrite(customkey, strlen(customkey), 1);