Skip to content

Commit

Permalink
Run through standard.
Browse files Browse the repository at this point in the history
  • Loading branch information
hackergrrl committed Sep 1, 2024
1 parent 002afa2 commit 29acca3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions util.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function wrapAnsi (text, width) {
line = ''
lineWidth = 0
} else if (lineWidth > width) {
line = line.slice(0, line.length-1); i-- // Don't include the char that brought us over the width; reuse it
line = line.slice(0, line.length - 1); i-- // Don't include the char that brought us over the width; reuse it
const breakpoint = line.lastIndexOf(' ')
if (insideWord && breakpoint >= 0) {
res.push(line.slice(0, breakpoint)) // grab the first part of the line and push its str as a result
Expand All @@ -81,7 +81,7 @@ function wrapAnsi (text, width) {
}
}

res.push(line)
res.push(line)

return res
}
Expand Down
2 changes: 1 addition & 1 deletion views.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function renderMessages (state, width, height) {
return accum
}

let indent = util.strwidth(msg.formattedPrefix)
const indent = util.strwidth(msg.formattedPrefix)

const lines = util.wrapAnsi(msg.content, width - indent)
if (lines.length === 0) return accum
Expand Down

0 comments on commit 29acca3

Please sign in to comment.