mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
selection quit when we jump to update outside of viewport
This commit is contained in:
@ -3417,6 +3417,12 @@ pub fn cursorPosCallback(
|
||||
return;
|
||||
};
|
||||
|
||||
// handle the case where we go outside of the viewport
|
||||
// which is represented by a negative position for both x and y
|
||||
if (pos.x < 0 and pos.y < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle dragging depending on click count
|
||||
switch (self.mouse.left_click_count) {
|
||||
1 => try self.dragLeftClickSingle(pin, pos.x),
|
||||
@ -3548,7 +3554,6 @@ fn dragLeftClickSingle(
|
||||
// ALWAYS selected the current char, but we must move the cursor
|
||||
// left of the xboundary.
|
||||
// - Inverted logic for forwards selections.
|
||||
//
|
||||
|
||||
// Our clicking point
|
||||
const click_pin = self.mouse.left_click_pin.?.*;
|
||||
|
Reference in New Issue
Block a user