chiark / gitweb /
Add highlighting methods to the TextFragment trait.
authorSimon Tatham <anakin@pobox.com>
Thu, 4 Jan 2024 07:30:41 +0000 (07:30 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 4 Jan 2024 08:14:03 +0000 (08:14 +0000)
commita3cfb23578e49a4a9270de2dc9ca325859912f4c
treec9de332949ddc3d6b9df6e2c0868f8bcc80d4815
parent36dd8f4b38f4bb9b525e722798b8a7d4123e71f2
Add highlighting methods to the TextFragment trait.

I've chosen to have three rather than two classes of thing you can
highlight, by separately indicating whether a text fragment contains
highlightable 'statuses' or 'whole statuses'. The distinction is that
a 'whole status' means you can see all the text, whereas a 'status'
just means you can somehow identify which post it is. I'll use that to
arrange that replying, favouriting and boosting only apply to whole
statuses (too easy to make a mistake otherwise), whereas any 'get
more info' commands apply to any old status.

(In particular, this way, you can see a one-line summary of a status,
press [I] to look at the whole thing, and _then_ fave/boost/reply.)
src/text.rs