From a6d3d5194575b8292a970b38791951fe1e1f6c80 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 10 Oct 2023 09:35:11 -0700 Subject: [PATCH 1/3] core: mouse selection when moving left before half-way point If you have a cell "M" and you click before the mid-point of M on the left side and then drag left, we should not select "M". --- src/Surface.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Surface.zig b/src/Surface.zig index e6cd409f3..8d6c68a69 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -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{ From a2346271568aadab71b4c12bee824cd547ff78ea Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 10 Oct 2023 09:37:11 -0700 Subject: [PATCH 2/3] core: mouse selection to right should include first cell if past boundary --- src/Surface.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Surface.zig b/src/Surface.zig index 8d6c68a69..1bdad82f8 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -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{ From e11b3465d51404197e4e45648c22c4fadb36b5bd Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 10 Oct 2023 09:39:39 -0700 Subject: [PATCH 3/3] update prettier ignore to ignore website dev compiled --- .prettierignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.prettierignore b/.prettierignore index a1b713063..02fdc5b88 100644 --- a/.prettierignore +++ b/.prettierignore @@ -7,3 +7,6 @@ zig-out/ # macos is managed by XCode GUI macos/ + +# website dev run +website/.next