ref: b985a98b4941ad9b86dbdf43ac0bf844728c7ea7
parent: 1d76a2779b42ddaedb49ebc546c390ea3b295945
author: penny <penny@limitedideas.org>
date: Thu Jul 31 16:33:24 EDT 2025
Set the terminal width automatically
--- a/format.go
+++ b/format.go
@@ -2,8 +2,10 @@
//import "fmt"
import "strings"
+import "github.com/chzyer/readline"
-func hyphenate(input string, width int) (string) {+func hyphenate(input string) (string) {+ width := readline.GetScreenWidth()
result, remainder := hyphenateline(input, width)
var cresult string
for(len(remainder) > width -1) {--- a/mastodon.go
+++ b/mastodon.go
@@ -194,7 +194,7 @@
for _, _ = range media {postfix = postfix + "🖼️"
}
- plaintext = hyphenate(fmt.Sprintf("%v %v", poststring, postfix), 80)+ plaintext = hyphenate(fmt.Sprintf("%v %v", poststring, postfix))return
}
--
⑨