API cut: delete selection
| 682 | |
| 683 | // API cut: delete selection |
| 684 | static int stb_textedit_cut(STB_TEXTEDIT_STRING* str, STB_TexteditState* state) |
| 685 | { |
| 686 | if (STB_TEXT_HAS_SELECTION(state)) { |
| 687 | stb_textedit_delete_selection(str, state); // implicitly clamps |
| 688 | state->has_preferred_x = 0; |
| 689 | return 1; |
| 690 | } |
| 691 | return 0; |
| 692 | } |
| 693 | |
| 694 | // API paste: replace existing selection with passed-in text |
| 695 | static int stb_textedit_paste_internal(STB_TEXTEDIT_STRING* str, STB_TexteditState* state, STB_TEXTEDIT_CHARTYPE* text, int len) |
no test coverage detected