Ctrl-A selection

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2025-10-11 23:13:42 +03:00
parent 92dbad27ee
commit 58c5c2c6c4
3 changed files with 7 additions and 4 deletions

View File

@@ -335,6 +335,13 @@ auto App::init_wayland() -> void
handled = true;
}
break;
case XKB_KEY_a:
case XKB_KEY_A:
if (ctrl) {
app->m_kbd.typing.push_back('a');
handled = true;
}
break;
default:
break;
}

View File

@@ -516,7 +516,6 @@ auto ImGui::text_input(usize id, std::pmr::string &str, Rectangle rec,
if (m_ctrl) {
state.sel_anchor_idx = 0;
state.current_rune_idx = (int)spans.size();
state.selecting_all = true;
request_refresh = true;
break;
}
@@ -606,8 +605,6 @@ auto ImGui::text_input(usize id, std::pmr::string &str, Rectangle rec,
else
caret_byte = clamp_cursor();
caret_activity = true;
if (!m_shift)
state.clear_selection();
}
state.caret_byte = caret_byte;

View File

@@ -113,7 +113,6 @@ private:
Rectangle caret_rect {};
bool external_change { false };
int sel_anchor_idx = -1;
bool selecting_all = false;
bool has_selection(int curr_idx) const
{