refactor: move cut_to helix workaround to a helix specific command

This commit is contained in:
CJ van den Berg 2025-04-03 06:35:07 +02:00
parent 62c6313107
commit 563eb57e44
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 16 additions and 10 deletions

View file

@ -2495,14 +2495,7 @@ pub const Editor = struct {
continue;
}
switch (tui.get_selection_style()) {
.inclusive => {
const sel = try cursel.enable_selection(root, self.metrics);
cursel.cursor = sel.end;
cursel.check_selection(root, self.metrics);
},
else => with_selection_const(root, move, cursel, self.metrics) catch continue,
}
with_selection_const(root, move, cursel, self.metrics) catch continue;
const cut_text, root = self.cut_selection(root, cursel) catch continue;
if (first) {