aboutsummaryrefslogtreecommitdiff
path: root/internal/journal/read.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/journal/read.go')
-rw-r--r--internal/journal/read.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/journal/read.go b/internal/journal/read.go
index 48cd6b0..9099c0d 100644
--- a/internal/journal/read.go
+++ b/internal/journal/read.go
@@ -172,10 +172,12 @@ func Entries(path, runID string) ([]Entry, error) {
// runFieldOf best-effort extracts a line's Run column even when the line
// otherwise fails to parse, so Entries can tell whether an unparsable line
-// belonged to the run it was asked for.
+// belonged to the run it was asked for. The column counts only when a tab
+// ends it: a line cut inside it holds a prefix of some run's ID, which names
+// no run (plan 10 re-check R2).
func runFieldOf(line string) (string, bool) {
f := strings.SplitN(line, "\t", 3)
- if len(f) < 2 {
+ if len(f) < 3 {
return "", false
}
return unescape(f[1]), true