diff options
author | WlodekM <[email protected]> | 2025-01-24 19:57:13 +0200 |
---|---|---|
committer | WlodekM <[email protected]> | 2025-01-24 19:57:13 +0200 |
commit | d75294c7d4af1c48f01d486dd8f40742dbbdcd91 (patch) | |
tree | d0b1d7ec522bb466960a99aaca9c922d1ada39ad /screen/home.ts | |
parent | 39409714f0050f333942afa25ea3d07ef8334e1c (diff) |
fix wrapping
Diffstat (limited to 'screen/home.ts')
-rw-r--r-- | screen/home.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/screen/home.ts b/screen/home.ts index 296fec2..097e0f7 100644 --- a/screen/home.ts +++ b/screen/home.ts @@ -23,7 +23,8 @@ export default { const termWidth = process.stdout.columns; let splitText = this.text.split("\n"); - splitText = splitText.map(t => t.replace(new RegExp(`([^]){${termWidth}}`, "g"),"$1\n")); + splitText = splitText.map(t => t.replace(new RegExp(`([^]{${termWidth}})`, "g"),"$1\n")); + this.screen.logs.push(JSON.stringify(splitText)) splitText = splitText.join("\n").split("\n") splitText = splitText.slice(-(termHeight - inputValueHeight)); |