mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-26 09:01:35 +01:00
Let focus have a trailing comma.
This commit is contained in:
1 parent
c62aa518a5
commit
0230a65c7b
1 file changed
+5
@@ -62,6 +62,10 @@ bool check_focus() {
|
|||||||
q++;
|
q++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (p == q) {
|
||||||
|
// No-op. Skip empty focus targets, which makes it convenient to
|
||||||
|
// copy/paste a string with a trailing comma.
|
||||||
|
} else {
|
||||||
// See if proc_funcname (with or without a "test_" or "bench_" prefix)
|
// See if proc_funcname (with or without a "test_" or "bench_" prefix)
|
||||||
// starts with the [p, q) string.
|
// starts with the [p, q) string.
|
||||||
if (!strncmp(proc_funcname, p, q - p)) {
|
if (!strncmp(proc_funcname, p, q - p)) {
|
||||||
@@ -77,6 +81,7 @@ bool check_focus() {
|
|||||||
!strncmp(unprefixed_proc_funcname, p, q - p)) {
|
!strncmp(unprefixed_proc_funcname, p, q - p)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (*q == '\x00') {
|
if (*q == '\x00') {
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in new issue
Block a user