szn

Bug 127 — server/server.zig — findPaneAtNode doesn’t subtract border width

127. server/server.zig — findPaneAtNode doesn’t subtract border width

File: src/server/server.zig:1006–1023 (vs 906–917) Severity: MEDIUM Status: ✅ FIXED — findPaneAtNode now uses split_w -| 1 for left child width, matching collectPaneBounds. Border clicks return null (no pane found). Test added.

// findPaneAtNode (line 1010):
return self.findPaneAtNode(s.a, x, y, lx, ly, split_w, lh);
// collectPaneBounds (line 909):
try self.collectPaneBounds(s.a, lx, ly, split_w -| 1, lh, result);

collectPaneBounds gives the left pane split_w - 1 columns (reserving 1 column for the border). findPaneAtNode gives it split_w columns. A click on the border column is attributed to the left pane by findPaneAtNode, but the pane doesn’t actually own that column. This causes mouse clicks on borders to focus the wrong pane.