MCPcopy Create free account
hub / github.com/crosire/reshade / append_text

Method append_text

source/imgui_code_editor.cpp:828–838  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

826 set_text(std::string_view());
827}
828void reshade::imgui::code_editor::append_text(const std::string_view text)
829{
830 text_pos cursor_pos = _cursor_pos;
831 const bool reset_cursor_pos = cursor_pos != get_text_end();
832 _cursor_pos = get_text_end();
833 insert_text(text);
834 // Keep the cursor position at the new end when the cursor was at the end before
835 // This way the editor scrolls with text being appended when the cursor is at the end, but does not scroll when the cursor is somewhere else
836 if (reset_cursor_pos)
837 _cursor_pos = cursor_pos;
838}
839void reshade::imgui::code_editor::insert_text(const std::string_view text)
840{
841 undo_record u;

Callers 1

draw_gui_logMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected