summaryrefslogtreecommitdiff
path: root/internal/ui/table.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-08 21:59:10 +0300
committerPaul Buetow <paul@buetow.org>2026-04-08 21:59:10 +0300
commit103f369cee209f6f0a15ef953cff138ffa025a26 (patch)
treeba9ee209acab34726fc1d43753aee18bc98a46d0 /internal/ui/table.go
parentbcfeb2deb2fc089c81971744774095409ad12a43 (diff)
task b: protect regex cache with RWMutex
Diffstat (limited to 'internal/ui/table.go')
-rw-r--r--internal/ui/table.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/ui/table.go b/internal/ui/table.go
index 03c4774..1314eb1 100644
--- a/internal/ui/table.go
+++ b/internal/ui/table.go
@@ -7,6 +7,7 @@ import (
"regexp"
"strconv"
"strings"
+ "sync"
"time"
"github.com/charmbracelet/x/ansi"
@@ -26,6 +27,7 @@ var priorityOptions = []string{"H", "M", "L", ""}
var (
urlRegex = regexp.MustCompile(`https?://\S+`)
searchRegexCache = make(map[string]*regexp.Regexp, 16)
+ searchRegexMu sync.RWMutex
)
type cellMatch struct {