Skip to main content

Module complete

Module complete 

Source
Expand description

tab completion for the composer — emote names and usernames, twitch-style.

pure text machinery: the face hands in the line, the cursor, and candidate iterators; this returns what span to replace with what. cycling state lives here so repeated tabs walk the match list; ANY other edit drops the state (the face clears it), which is what makes the walk feel like one gesture.

@word completes usernames only (the @ is kept); a bare word matches emote names first (case-insensitive prefix), then usernames — same order every chat client trains.

Structs§

Completion
a completion in progress: the matches for the word that was under the cursor, and which one currently occupies the line.