Select the whole line containing offset, including its line break.
- edit: the text being edited.
- offset: a byte offset in the line.
edit: Text_Edit;
defer free_text_edit(*edit);
set_contents(*edit, "one\ntwo\nthree");
select_line_at(*edit, 5);
assert(selected_text(*edit) == "two\n");select_line_at :: (edit: *Text_Edit, offset: int)
Select the whole line containing offset, including its line break.
Parameters
- edit: *Text_Edit
- the text being edited.
- offset: int
- a byte offset in the line.
edit: Text_Edit;
defer free_text_edit(*edit);
set_contents(*edit, "one\ntwo\nthree");
select_line_at(*edit, 5);
assert(selected_text(*edit) == "two\n");