| 774 | } |
| 775 | } |
| 776 | void reshade::imgui::code_editor::select_all() |
| 777 | { |
| 778 | if (_lines.empty()) |
| 779 | return; // Cannot select anything if no text is set |
| 780 | |
| 781 | // Move cursor to end of text |
| 782 | _cursor_pos = text_pos(_lines.size() - 1, _lines.back().size()); |
| 783 | |
| 784 | // Update selection to contain everything |
| 785 | _interactive_beg = text_pos(0, 0); |
| 786 | _interactive_end = _cursor_pos; |
| 787 | |
| 788 | select(_interactive_beg, _interactive_end); |
| 789 | } |
| 790 | |
| 791 | void reshade::imgui::code_editor::set_text(const std::string_view text) |
| 792 | { |