set_insert_mode(3)

πŸ“¦ version 1.6, in fedora 43, fedora 44

✨ set_insert_mode(3) ✨

okay bestie, so you know how sometimes you're typing and you insert a letter in the middle and everything shifts, and sometimes you just straight-up bulldoze the next character? yeah. this function is literally the switch for that vibe. it lives in the gstream manual, section 3, and it's giving "tiny function, huge personality." πŸ’…


🌸 NAME 🌸

set_insert_mode β€” the little icon that decides if your typing inserts or overwrites, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gstream.h>

void set_insert_mode(bool im);

πŸ’– DESCRIPTION πŸ’–

so here's the tea. if you call this with true, the edit mode is set to insert β€” meaning if you type a character in the middle of a string, it inserts it, and does not overwrite the next character. it just politely squeezes in like "excuse me, coming through." πŸŽ€

if you call it with false, the edit mode is overwrite. the new character just replaces the next one. main character energy, but make it destructive. πŸ’€

now, plot twist: the user is capable of changing this state by pressing the insert key. and that change will be saved for the next inputs to the stream. so like, you set it, but they can still pop off and flip it. not me warning you. πŸ™ˆ

the default value is true. so out of the box, it's insert mode. slay. ✨

bestie note: this is a state that lives with the stream, so whatever the user does with the insert key sticks around for next time. iykyk.

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, babe. this was set_insert_mode(3) from the gstream manual, version 1.6. mwah. πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from