mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-24 12:46:10 +03:00
Merge pull request #650 from mitchellh/mouse
Mouse selection fixes around the initially clicked cell
This commit is contained in:
@ -7,3 +7,6 @@ zig-out/
|
||||
|
||||
# macos is managed by XCode GUI
|
||||
macos/
|
||||
|
||||
# website dev run
|
||||
website/.next
|
||||
|
@ -1853,7 +1853,7 @@ fn dragLeftClickSingle(
|
||||
// - Inverse logic for a point after the start.
|
||||
const click_point = self.mouse.left_click_point;
|
||||
const start: terminal.point.ScreenPoint = if (screen_point.before(click_point)) start: {
|
||||
if (self.mouse.left_click_xpos > cell_xboundary) {
|
||||
if (cell_start_xpos >= cell_xboundary) {
|
||||
break :start click_point;
|
||||
} else {
|
||||
break :start if (click_point.x > 0) terminal.point.ScreenPoint{
|
||||
@ -1865,7 +1865,7 @@ fn dragLeftClickSingle(
|
||||
};
|
||||
}
|
||||
} else start: {
|
||||
if (self.mouse.left_click_xpos < cell_xboundary) {
|
||||
if (cell_start_xpos < cell_xboundary) {
|
||||
break :start click_point;
|
||||
} else {
|
||||
break :start if (click_point.x < self.io.terminal.screen.cols - 1) terminal.point.ScreenPoint{
|
||||
|
Reference in New Issue
Block a user