diff options
Diffstat (limited to 'src/mouse.zig')
| -rw-r--r-- | src/mouse.zig | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/mouse.zig b/src/mouse.zig index 69d1456e..32f7c716 100644 --- a/src/mouse.zig +++ b/src/mouse.zig @@ -807,7 +807,6 @@ pub fn handleMouse(p: *Pardes, event: Mouse) void { pane.tag.mode = .normal; pane.tag.normal.clear(); pane.tag.vsel.active = false; - pane.tag.msel.active = false; pane.tag.nsel = 0; pane.tag.cur_pinned = true; const at = tagline.tagOffsetAt(p, pane, @intCast(@max(0, pointed.sel.r0)), @intCast(@max(0, pointed.sel.c0))) orelse modal.Cursor{ .row = 0, .col = 0 }; @@ -1144,7 +1143,6 @@ fn mirrorTtySelection(p: *Pardes, pane: *Pane) void { } pane.body.cur_col = @intCast(modal.graphemeStart(shown, @min(shown.len, byte -| endpoint.prompt_bytes))); pane.body.cur_pinned = true; - pane.body.msel.active = false; pane.body.vsel.active = false; pane.body.nsel = 0; pane.body.select = false; @@ -1308,7 +1306,6 @@ fn dragRelease(p: *Pardes, button: Mouse.Button) void { ); pane.body.cur_pinned = true; if (edit.clampFileCursor(&pane.body)) pane.ensureCursorVisible(); - pane.body.msel.active = false; pane.body.normal.clear(); pane.body.vsel.active = false; pane.body.nsel = 0; // a click says WHERE the one cursor is @@ -1353,7 +1350,6 @@ fn dragRelease(p: *Pardes, button: Mouse.Button) void { // must not stretch to it; borrowed selections retain // their original cursor and extent. pane.body.vsel.active = false; - pane.body.msel.active = false; pane.body.nsel = 0; pane.body.select = false; pane.body.cur_row = operand.row; @@ -1427,7 +1423,6 @@ fn chordCutPaste(p: *Pardes, cut: bool) void { t.cur_col = @intCast(to.col); t.cur_pinned = true; t.vsel = .{ .active = from.row != to.row or from.col != to.col, .row = @intCast(from.row), .col = @intCast(from.col), .explicit = false }; - t.msel.active = false; t.nsel = 0; } if (cut) { @@ -1479,7 +1474,6 @@ fn chordCutPaste(p: *Pardes, cut: bool) void { pane.body.cur_row = row1; pane.body.cur_col = col1; pane.body.cur_pinned = true; - pane.body.msel.active = false; pane.body.normal.clear(); if (!pane.isTerminal()) pane.body.mode = .normal; pane.body.vsel = .{ .active = row0 != row1 or col0 != col1, .row = row0, .col = col0, .explicit = false }; @@ -1522,7 +1516,6 @@ test "plain left click clears explicit modal selection" { pane.body.cur_row = 0; pane.body.cur_col = 5; pane.body.vsel = .{ .active = true, .row = 0, .col = 1, .explicit = true }; - pane.body.msel = .{ .active = true, .r0 = 0, .r1 = 0 }; var frame = std.heap.ArenaAllocator.init(gpa); defer frame.deinit(); @@ -1535,7 +1528,6 @@ test "plain left click clears explicit modal selection" { try std.testing.expectEqual(@as(i32, 3), pane.body.cur_col); try std.testing.expect(!pane.body.vsel.active); - try std.testing.expect(!pane.body.msel.active); try std.testing.expectEqual(.none, pane.sel[@backingInt(config.select_button)].state); } |
