shift-click extends selection
parent
ae0738f0a9
commit
5f5700259f
1
TODO.md
1
TODO.md
|
|
@ -18,7 +18,6 @@ Correctness:
|
|||
Improvements:
|
||||
|
||||
* scrollback: configurable
|
||||
* shift-click and drag to continue selection
|
||||
|
||||
Mac:
|
||||
|
||||
|
|
|
|||
|
|
@ -1514,6 +1514,17 @@ pub fn mouseButtonCallback(
|
|||
self.mouse.click_state[@intCast(usize, @enumToInt(button))] = action;
|
||||
self.mouse.mods = @bitCast(input.Mods, mods);
|
||||
|
||||
// Shift-click continues the previous mouse state. cursorPosCallback
|
||||
// will also do a mouse report so we don't need to do any the logic
|
||||
// below.
|
||||
if (button == .left and action == .press) {
|
||||
if (mods.shift and self.mouse.left_click_count > 0) {
|
||||
const pos = try self.rt_surface.getCursorPos();
|
||||
try self.cursorPosCallback(pos);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
self.renderer_state.mutex.lock();
|
||||
defer self.renderer_state.mutex.unlock();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue