Skip to content

Dev - #3

Merged
Neotoxic-off merged 15 commits into
masterfrom
dev
Oct 19, 2026
Merged

Dev#3
Neotoxic-off merged 15 commits into
masterfrom
dev

Conversation

@Neotoxic-off

Copy link
Copy Markdown
Owner

No description provided.

Measured per phase: URL detection built a String at every char of every
shown line, 40% of a frame; a line without "://" now skips it. The
completion menu cloned, hashed and sorted every matching word on each
key; it now borrows them, hashes only words from other buffers, compares
ASCII by bytes and sorts only the 50 it shows. Open + draw 2.1 -> 1.0 ms,
typing 500 chars 145 -> 121 ms, scrolling 63 -> 56 ms.
tools.rs held nine tools in 1500 lines. Each now has its own module
(calculator, units, bases, time, colors, JSON, generated text, case)
with its tests beside it; tools/mod.rs keeps the Tool table and the
popup. The JSON layout, one 94-line loop, is a small Layout with a
method per kind of char: string, comment, bracket, separator.
draw_line was one 95-line loop. A LinePaint now holds what the line
needs once (theme, background, guide, search matches) and builds a
char's style in layers: syntax, URL, word, TODO, hex color, bracket,
selection or search. Blanks with guides and guides past the text get
their own functions. Same frames, same timings.
The tabline is a Tabs that pushes one buffer's tab at a time, with its
icon and mark worked out apart, then the buttons. The statusline is
NvChad's modules in a row: caps, mode and file, git, activity, cwd and
position. The gallery renders byte for byte the same.
compose was 86 lines. Rows shares the screen's rows between the bars and
the text; side_panels, text_area, bottom_bars and overlays draw the tree
and preview, the windows, the bars, then the floats. The tool popup and
split borders leave windows() too. The gallery renders the same.
explorer() keeps the scrolling and the loop; an entry's row, icon, name
color and git symbol each have a function. The gallery renders the same.
picker() lays out three parts, each drawn by its own function; a result
row, the preview's source (file, buffer, theme sample) and a highlighted
code row are separate too.
text_rows keeps the scroll and the loop; a Gutter knows its width and
draws a line's number and gitsigns mark, and decor_for finds a line's
highlights. The theme is passed down, not fetched per line: without an
installed theme (the benchmarks) each fetch builds one. Same frames,
same timings.
run() reads as the loop it is: draw, wait, handle, then the shell or the
clipboard. The panic hook, a frame drawn under catch_unwind, an event
handled under it, and a shell run each have a function.
inline() was an 81-line loop of closures and flags. Inline holds the
spans and the emphasis; flush, look and toggle are its methods, and a
code span and a link are read by their own functions.
open_picker builds the Picker; picker_items is the table of sources, and
the buffer, command, line and smart lists each have a function.
submit checks the path and the answer, then reports; run_prompt is the
table of actions, and the tree's add, copy and delete, with the path an
action touches, are plain functions.
detect() routes to elf() and pe(); the other magic bytes are a table.
setup() lays the popup out; the search field, the list of section and
setting rows, and one row's columns each have a function.
A screenshots test plays each README scene with real keys in a small
demo project and writes its frame as SVG; the PNGs are rasterised from
them (docs/development.md says how). Twelve scenes now, the tools popup,
the visual selection and the settings among them, and captions that
match. The architecture page shows the tools modules and how a frame and
a line are drawn; the feature table says NvChad look.
@Neotoxic-off
Neotoxic-off merged commit 5714903 into master Oct 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant