aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-05 04:13:01 -0500
committerCraig Jennings <c@cjennings.net>2026-05-05 04:13:01 -0500
commit326bffaa2f555f863abb7a9cc0887c86779ea97b (patch)
tree1ffb4dcac949ac70ada2b349559ac1506972d6f7 /tests
parent30d48a0fffb2e89a070a726c784d8544ae5043b9 (diff)
downloadorg-drill-326bffaa2f555f863abb7a9cc0887c86779ea97b.tar.gz
org-drill-326bffaa2f555f863abb7a9cc0887c86779ea97b.zip
fix: don't create zero-width overlay for hint-less clozes
org-drill-hide-cloze-hints checked (null (match-beginning 2)) to detect "no hint present," but the cloze regex's hint group is an empty-allowed alternation — the group always participates in the match, so match-beginning is always a position, never nil. For a card like "[Paris]" (no hint), the function fell through to org-drill-hide-region with start = end and made a zero-width overlay. Cosmetically harmless but accumulates one stray overlay per hint-less cloze. On a buffer with many such cards the tracking cost is real. Switched the guard to (= (match-beginning 2) (match-end 2)) — empty match. Found while writing tests; locked in by tests/test-org-drill-hide-show.el's test-org-drill-hide-cloze-hints-no-hint-no-overlay.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions