No description
Find a file
Greembow bae267dee9 draw the caret when it sits on a blank
Root cause is in Skald, which is not ours to change, so this works around it
and records what to report upstream.

skald/text.odin, wrap_rich_text's `flush`, trims trailing Space atoms off a
line before it builds the segments the renderer draws from:

    for len(cur) > 0 && cur[len(cur)-1].kind == .Space { pop(cur) }

Backgrounds are painted per SEGMENT (layout.odin, case View_Rich_Text, the
`sp.bg.a > 0` chip). So a span whose only content is that trailing space loses
its segment and everything the span carried with it -- bg, underline, strike,
link. This editor draws the caret AS a background, an inverted cell, so a
caret on a trailing space or on the padding cell past the end of a line was
never drawn at all. Confirmed against 0ce82bd: it predates the wrap work
entirely.

Two things make it a bug rather than a policy. The trim is a WRAPPING
behaviour -- its own comment says "on a wrapped line" -- but `flush` runs for
every line, and this editor passes no max_width at all, so nothing is being
wrapped. And it drops the atom outright instead of zeroing its width, which is
all the layout goal needs; the styling could have survived either way.

The workaround: a span that is nothing but blanks AND carries a background
reaches the renderer as U+00A0 instead. A no-break space is not a Space atom,
so it survives the trim and draws the same blank cell. Render-only -- it
happens in editor_row, after editor_line_spans, so the spans layer still hands
back a faithful partition of the line and the buffer and copied text are
untouched. It fixes the selection version of the same bug for free: a
selection ending in trailing blanks used to lose its highlight on them.

editor_wrap_destroy exists for the test process, not the app. The wrap cache
lives as long as the editor and `clear` already bounds it, but its map backing
outlived every test that touched it and the leak tracker billed it to
whichever one grew it first -- which moved with the thread schedule and made
the suite fail about one run in three.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TEXvgzLaEdsPrKwiofa7tH
2026-09-15 19:53:40 -07:00
Skald@a431b47df2 add skald 2026-09-14 15:39:01 -07:00
.gitignore add multithreaded worker pool 2026-09-15 13:25:38 -07:00
.gitmodules add skald 2026-09-14 15:39:01 -07:00
buffer.odin wrap lines, and page by the window instead of by twenty 2026-09-15 17:18:40 -07:00
buffer_test.odin add the line breaker and make a row a window 2026-09-15 16:25:00 -07:00
editor.odin draw the caret when it sits on a blank 2026-09-15 19:53:40 -07:00
editor_wrap_test.odin draw the caret when it sits on a blank 2026-09-15 19:53:40 -07:00
hscroll.odin ok fr this time add horizontal scrolling 2026-09-15 15:42:36 -07:00
main.odin wrap lines, and page by the window instead of by twenty 2026-09-15 17:18:40 -07:00
parallel.odin add multithreaded worker pool 2026-09-15 13:25:38 -07:00
pool.odin finish porting to lasso 2026-09-14 22:06:39 -07:00
README.md update readme 2026-09-15 11:10:27 -07:00
rope.odin 98x faster editing and other improvements 2026-09-15 13:28:12 -07:00
rope_test.odin add multithreaded worker pool 2026-09-15 13:25:38 -07:00
structures.odin rename project to lasso 2026-09-14 22:02:37 -07:00
TODOs.txt add multithreaded worker pool 2026-09-15 13:25:38 -07:00
vscroll.odin scroll the editor from an anchor instead of virtual_list 2026-09-15 16:31:39 -07:00
vscroll_test.odin wrap lines, and page by the window instead of by twenty 2026-09-15 17:18:40 -07:00
work.odin add multithreaded worker pool 2026-09-15 13:25:38 -07:00
work_test.odin add multithreaded worker pool 2026-09-15 13:25:38 -07:00
wrap.odin add the line breaker and make a row a window 2026-09-15 16:25:00 -07:00
wrap_test.odin add the line breaker and make a row a window 2026-09-15 16:25:00 -07:00

Lasso

Get a grip on your code!

Lasso is my attempt to make an ide that isn't doodoo asscheeks. Written in Odin with the Skald GUI library. Designed and optimized to be fast while editing fuckoff bigmassive files.

Enjoy, I guess.