TICKIT_TERM_ERASECH(3)

πŸ’– TICKIT_TERM_ERASECH πŸ’–

okay bestie, gather round, because we're talking about tickit_term_erasech from the tickit library manual (section 3, library functions, you know the vibe) ✨


🌸 NAME 🌸

tickit_term_erasech β€” erase characters from the terminal 🧹


✨ SYNOPSIS ✨

#include <tickit.h>

void tickit_term_erasech(TickitTerm *tt, int count, TickitMaybeBool moveend);

Link with -ltickit. πŸ”—


πŸ¦‹ DESCRIPTION πŸ¦‹

so tickit_term_erasech() erases count character cells going forward from wherever the cursor is sitting right now, and it does it using the current pen background colour πŸ’…

now here's the tea, because not every terminal is built the same and this is where it gets interesting πŸ™ˆ Some terminals literally cannot erase using the background colour. so on those ones, this operation might get implemented by just printing spaces instead. and the consequence of that? the cursor gets moved to the end of the erased region. meanwhile, the other terminals β€” the ones that can erase with background colour β€” get to erase without the cursor moving at all. iconic behaviour honestly πŸ‘‘

that's where the moveend parameter comes in, because it controls where the cursor ends up when this function returns:

  • TICKIT_YES β€” the cursor gets moved to the end of the erased region if that's required. no cap, it's going to the end 🫢
  • TICKIT_NO β€” the cursor gets moved back to its original location if that's required. it stays home, periodt.
  • TICKIT_MAYBE β€” this function just takes whichever behaviour is more optimal on the given terminal. main character energy, it decides for itself ✨

πŸŽ€ RETURN VALUE πŸŽ€

tickit_term_erasech() returns no value. that's it, that's the whole thing, it's giving void πŸ’€


🌈 SEE ALSO 🌈


okay that's the whole page, you ate it, you understood it, i'm obsessed πŸ“πŸ’œ this was TICKIT_TERM_ERASECH(3) from the Library Functions Manual β€” mwah, go erase some cells bestie πŸ§šπŸ’–