go back to regular completions if no system commands match

This commit is contained in:
dzaima 2023-02-27 23:51:35 +02:00
parent dfd78115c3
commit 397f8745ce
2 changed files with 6 additions and 2 deletions

View File

@ -258,6 +258,7 @@ static bool isCmd(char* s, char** e, const char* cmd) {
we = chars+IA(inpB);
mode = 3;
} else {
not_cmd:;
we = chars+IA(inpB);
ws = rskip_name(chars, we);
u32 last = ws>chars? *(ws-1) : 0;
@ -270,6 +271,7 @@ static bool isCmd(char* s, char** e, const char* cmd) {
}
usz wl = *dist = we-ws;
bool failedCmd = mode==3;
if (wl>0) {
usz wo = ws-chars;
bool doUpper = false;
@ -308,6 +310,7 @@ static bool isCmd(char* s, char** e, const char* cmd) {
}
if (matchState) {
failedCmd = false;
usz ext = matchLen-skip;
assert(ext<100);
u32* rp; B r = m_c32arrv(&rp, wl + ext);
@ -333,6 +336,7 @@ static bool isCmd(char* s, char** e, const char* cmd) {
}
decG(norm);
if (mode==1) decG(reg);
if (failedCmd) goto not_cmd;
}
dec(inpB);

View File

@ -56,8 +56,8 @@ transpose{T}(r0:*void, x0:*void, w:u64, h:u64) : void = {
# hm:= h/8
# transpose_rec{T}(rp, xp, w, h, i64~~wm, i64~~hm, tern{wm>hm, wm, hm})
if (w%8) emit{void, 'base_transpose_u32', rp+h*(w-w%8), xp+(w-w%8), w%8, h, w, h}
if (h%8) emit{void, 'base_transpose_u32', rp+(h-h%8), xp+w*(h-h%8), w-w%8, h%8, w, h}
if (w%8) emit{void, 'base_transpose_u32', rp+h*(w-w%8), xp+ (w-w%8), w%8, h, w, h}
if (h%8) emit{void, 'base_transpose_u32', rp+ (h-h%8), xp+w*(h-h%8), w-w%8, h%8, w, h}
}
'simd_transpose_i32' = transpose{u32}