Skip to content

Commit 1b6dbc1

Browse files
FIX: don't report mouse movement as drag
1 parent 5fbf78c commit 1b6dbc1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Sources/SwiftTerm/Mac/MacTerminalView.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,7 +1087,10 @@ open class TerminalView: NSView, NSTextInputClient, NSUserInterfaceValidations,
10871087
}
10881088

10891089
if terminal.mouseMode.sendMotionEvent() {
1090-
let flags = encodeMouseEvent(with: event)
1090+
var flags = encodeMouseEvent(with: event)
1091+
if flags & 0b1100_0011 == 0 {
1092+
flags = flags + 64
1093+
}
10911094
terminal.sendMotion(buttonFlags: flags, x: hit.grid.col, y: hit.grid.row, pixelX: hit.pixels.col, pixelY: hit.pixels.row)
10921095
}
10931096
}

0 commit comments

Comments
 (0)