fix: stop rendering the timestamp twice at conceallevel=0 #12
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/timestamp-doubling"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Checklist
Problem
virt_textignores'conceallevel'; onlyconcealanswers to it. Both weredescribing the same 29 bytes, so lowering the level revealed the raw stamp
without removing the annotation drawn in front of it:
The underlying mistake is saying a thing is both content and annotation.
concealhides text that is in the buffer;virt_textrenders text that isnot. Pointing both at one range means two representations that cannot toggle
together.
Solution
The date is an overlay now — it occupies the stamp's cells instead of
displacing them, so there is nothing to double, at any level.
That leaves
concealwith exactly one job: hiding the##[...]markers. So'conceallevel'still means something, and what it means is now honest:The buffer is untouched either way — the raw stamp is still there to search and
yank.
The comma
An overlay has to match the width it covers. Verified both failure modes: 30
cells over 29 eats the following character, and a short one leaves a gap. So it
spans the stamp less its trailing space — 28 cells — which lets that space
separate the date from the log, and makes the date 28 wide. That costs the
comma after the weekday:
Mon 27 Jul 2026 15:14:08 GMT.virt_text ignores 'conceallevel'; only conceal answers to it. Both described the same 29 bytes, so lowering the level revealed the stamp without removing the annotation drawn over it: Mon, 27 Jul 2026 15:14:08 GMT 2026-07-27T15:14:08.0000000Z ✓ Set up job The date is an overlay now, which occupies the stamp's cells rather than displacing them, so there is nothing to double. Conceal is left with one job, hiding the ##[...] markers, which is the only thing 'conceallevel' now toggles. An overlay has to match the width it covers: a wider one eats the character after it, and a narrower one leaves a gap. So it spans the stamp less its trailing space, 28 cells, letting that space separate date from log, and the date is 28 wide, which costs the comma after the weekday.