Let focus have a trailing comma.

This commit is contained in:
Nigel Tao committed 2017-11-04 10:21:32 +11:00
1 parent c62aa518a5
commit 0230a65c7b
1 file changed
+5
+5
View File
@@ -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;