Replace the selection with the clipboard's text.
- ui: the UI whose clipboard hooks and text measuring to use.
- edit: the text being edited.
edit: Text_Edit;
defer free_text_edit(*edit);
ui := headless();
defer free_ui(*ui);
paste_clipboard(*ui, *edit); // inserts the clipboard text at the caretThis one is only checked to compile, not run.
paste_clipboard :: (ui: *UI_State, edit: *Text_Edit)
Replace the selection with the clipboard's text.
Parameters
- ui: *UI_State
- the UI whose clipboard hooks and text measuring to use.
- edit: *Text_Edit
- the text being edited.
edit: Text_Edit;
defer free_text_edit(*edit);
ui := headless();
defer free_ui(*ui);
paste_clipboard(*ui, *edit); // inserts the clipboard text at the caretThis one is only checked to compile, not run.