Skip to content

Commit

Permalink
fix for occasional panic during builds with long file paths, closes #105
Browse files Browse the repository at this point in the history
  • Loading branch information
danenania committed May 1, 2024
1 parent 98982de commit c4c48c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/cli/stream_tui/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ func (m streamUIModel) doRenderBuild(outputStatic bool) string {
sort.Strings(filePaths)

var rows [][]string
rows = append(rows, []string{})
lineWidth := 0
lineNum := 0
rowIdx := 0
Expand Down Expand Up @@ -137,16 +138,13 @@ func (m streamUIModel) doRenderBuild(outputStatic bool) string {
lineWidth = 0
lineNum++
rowIdx = 0
rows = append(rows, []string{})
} else {
block = maybePrefix + block
}

defBlockWidth := lipgloss.Width(block)

if len(rows) <= lineNum {
rows = append(rows, []string{})
}

row := rows[lineNum]
row = append(row, block)
rows[lineNum] = row
Expand Down
1 change: 1 addition & 0 deletions releases/cli/versions/0.9.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix for occasional stream TUI panic during builds with long file paths (https://github.com/plandex-ai/plandex/issues/105)

0 comments on commit c4c48c9

Please sign in to comment.