Replaces the whole text with a copy of text and forgets the undo history.
buffer: Text_Buffer;
defer free_buffer(*buffer);
set_text(*buffer, "one\ntwo");
assert(line_count(*buffer) == 2);set_text :: (buffer: *Text_Buffer, text: string)
Parameters
- buffer: *Text_Buffer
- text: string