Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/features/tmux-subagent/pane-state-querier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export async function queryWindowState(sourcePaneId: string): Promise<WindowStat
return null
}

const lines = stdout.trim().split("\n").filter(Boolean)
const lines = stdout.trim().replace(/\r/g, "").split("\n").filter(Boolean)
if (lines.length === 0) return null

let windowWidth = 0
Expand All @@ -36,10 +36,10 @@ export async function queryWindowState(sourcePaneId: string): Promise<WindowStat

for (const line of lines) {
const fields = line.split("\t")
if (fields.length < 9) continue
if (fields.length < 8) continue

const [paneId, widthStr, heightStr, leftStr, topStr, activeStr, windowWidthStr, windowHeightStr] = fields
const title = fields.slice(8).join("\t")
const title = fields.length > 8 ? fields.slice(8).join("\t") : ""
const width = parseInt(widthStr, 10)
const height = parseInt(heightStr, 10)
const left = parseInt(leftStr, 10)
Expand Down