summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/edit.zig13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/edit.zig b/src/edit.zig
index 707b576f..72cfe31a 100644
--- a/src/edit.zig
+++ b/src/edit.zig
@@ -1207,18 +1207,7 @@ pub fn normalYank(p: *Pardes, t: *Text) void {
setYank(p, text);
return;
};
- if (t.vsel.active) {
- setYank(p, vselText(p, t));
- return;
- }
- if (t.msel.active) {
- setYank(p, yankRows(p, t, @min(t.msel.r0, t.msel.r1), @max(t.msel.r0, t.msel.r1)));
- } else {
- const save = t.vsel;
- t.vsel = .{ .active = true, .row = t.cur_row, .col = t.cur_col, .explicit = false };
- setYank(p, vselText(p, t));
- t.vsel = save;
- }
+ setYank(p, if (t.vsel.active) vselText(p, t) else selText(p, t));
}
pub fn pasteText(p: *Pardes, t: *Text, y0: []const u8, before: bool, count: usize) void {