diff options
Diffstat (limited to 'src/mouse.zig')
| -rw-r--r-- | src/mouse.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mouse.zig b/src/mouse.zig index ac3e206b..61bd30e0 100644 --- a/src/mouse.zig +++ b/src/mouse.zig @@ -790,6 +790,7 @@ fn dragRelease(p: *Pardes, button: Mouse.Button) void { // stream; only the button which began this gesture may end it. if (p.drag.button() != button) return; defer p.drag = .none; + defer p.chord_hold = false; switch (p.drag) { .border_v => |d| { const c = d.left_col; @@ -1027,6 +1028,11 @@ fn chordCutPaste(p: *Pardes, cut: bool) void { } if (!s.chorded) { s.chorded = true; + // Everything done while B1 stays down is one undo step, as acme + // marks the file once per B1 hold (text.c:881 textselect, `state` + // and its one filemark): B1-B2 then B1-B3 is a copy. + edit.pushUndo(p, &pane.body); + p.chord_hold = true; const sl = pane.sel[sel_slot]; pane.sel[sel_slot].state = .none; const pfx: i32 = if (pane.file != null) panes.File.gutterWidth(pane) else 0; |
