feat: choose any of a line's four colours at the caret - #101
Merged
2 commits merged intoSep 6, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The current line's third row now carries the four colour buttons, and each opens a small picker that writes the ASS colour tag where the caret is. It sits on a new
Edit::SetOverrideTagincrates/sublore-edit/src/plan.rs, which writes a tag with a value the caller chose rather than one it worked out, and refuses a name that is not a name and a value carrying a brace, because that value would close the block it is written into. Sixteen colours are offered by name and any other is typed as#RRGGBB.Two defects came out of building it and are fixed here.
tags_inread a tag name as a backslash and the letters after it, so\2c,\3c,\4cand the four alphas parsed as nothing at all, and a block holding only one of them read as a note rather than as styling; a name may now carry one digit before its letters, which is the whole of what ASS puts there. And the four style buttons were alive on a format that carries no override tags, where the planner then refused the write; the condition they grey on now carries the format, so the colours and the four flags grey together on an SRT.Row three's style buttons became the letters B, I, U and S, each drawn in the style it writes. Four more buttons in that row wrapped it at the narrowest window and pushed Next line behind the panel's scroll; the letters take back more room than the colours cost, so the sweep without a waveform is clean at every interface size again and only the 110 per cent floor still needs the scroll, where the controls on either side of the colours were already pinned.
A second commit rides here rather than in a branch of its own, because the check it is aimed at is what blocks this one from going green.
useVideoPlayerwrote every answer it got back, whatever file it was about: a command sent against the file that was open could still be in flight when the next one opened, and its refusal then put a sentence on the status bar about a document nobody asked about. Each command now carries the open it belongs to, and an older answer is dropped. Found by reading while looking for BACKLOG N40, the check invideo-aspect.spec.jsthat fails on the runner and never here. Whether it is that check's cause is not proven, and cannot be here: two attempts to reproduce it by taking the audio output away did not.Changes
\2cand\1aare names, and a braced run holding one of them is styling; two tests.Edit::SetOverrideTagandplan_set_override_tag, which write one tag at the caret and refuse a name or a value that could break the line.subtitle_set_override_tag, with the tag, the value and the stretch grouped into one value.setOverrideTag.How to verify it by using the app
fixtures/subtitles/ass/clean/speakers.ass.{\3c&H0000FF&}before that word.#12AB34into its field and press Enter.{\c&H34AB12&}is written at the caret. ASS writes a colour blue first, which is why the digits come back reversed.#12ABinstead, with four digits, and press Enter. The field is marked as wrong and nothing is written.Verified on Linux: full gate green, and the battery green at 33 spec files of 33 with 278 checks. Two mutations each reddened its own check first, the byte order of the colour and the greying rule.