Select the word around offset.
- edit: the text being edited.
- offset: a byte offset in the word.
edit: Text_Edit;
defer free_text_edit(*edit);
set_contents(*edit, "hello world");
select_word_at(*edit, 8);
assert(selected_text(*edit) == "world");select_word_at :: (edit: *Text_Edit, offset: int)
Select the word around offset.
Parameters
- edit: *Text_Edit
- the text being edited.
- offset: int
- a byte offset in the word.
edit: Text_Edit;
defer free_text_edit(*edit);
set_contents(*edit, "hello world");
select_word_at(*edit, 8);
assert(selected_text(*edit) == "world");