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

Method move_bottom

source/imgui_code_editor.cpp:1640–1667  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1638 _scroll_to_cursor = true;
1639}
1640void reshade::imgui::code_editor::move_bottom(bool selection)
1641{
1642 assert(!_lines.empty());
1643
1644 const text_pos prev_pos = _cursor_pos;
1645 _cursor_pos = text_pos(_lines.size() - 1, 0);
1646
1647 if (prev_pos == _cursor_pos)
1648 return;
1649
1650 if (selection)
1651 {
1652 if (_interactive_beg > _interactive_end)
1653 std::swap(_interactive_beg, _interactive_end);
1654 if (prev_pos != _interactive_end)
1655 _interactive_beg = _interactive_end;
1656
1657 _interactive_end = _cursor_pos;
1658 }
1659 else
1660 {
1661 _interactive_beg = _cursor_pos;
1662 _interactive_end = _cursor_pos;
1663 }
1664
1665 select(_interactive_beg, _interactive_end);
1666 _scroll_to_cursor = true;
1667}
1668void reshade::imgui::code_editor::move_home(bool selection)
1669{
1670 assert(!_lines.empty());

Callers

nothing calls this directly

Calls 1

text_posClass · 0.85

Tested by

no test coverage detected