mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
shift-click extends selection
This commit is contained in:
1
TODO.md
1
TODO.md
@ -18,7 +18,6 @@ Correctness:
|
|||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
* scrollback: configurable
|
* scrollback: configurable
|
||||||
* shift-click and drag to continue selection
|
|
||||||
|
|
||||||
Mac:
|
Mac:
|
||||||
|
|
||||||
|
@ -1514,6 +1514,17 @@ pub fn mouseButtonCallback(
|
|||||||
self.mouse.click_state[@intCast(usize, @enumToInt(button))] = action;
|
self.mouse.click_state[@intCast(usize, @enumToInt(button))] = action;
|
||||||
self.mouse.mods = @bitCast(input.Mods, mods);
|
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();
|
self.renderer_state.mutex.lock();
|
||||||
defer self.renderer_state.mutex.unlock();
|
defer self.renderer_state.mutex.unlock();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user