From 15a8a867875c7388d0659a965ec312d00bc59301 Mon Sep 17 00:00:00 2001 From: Oliver <480930+rivo@users.noreply.github.com> Date: Thu, 7 Sep 2023 10:24:44 +0200 Subject: [PATCH] Default is word-wrapping. --- textview.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/textview.go b/textview.go index 3ffa551..f970ae5 100644 --- a/textview.go +++ b/textview.go @@ -63,6 +63,9 @@ func (w TextViewWriter) HasFocus() bool { // screen columns, but only if the text is left-aligned. If the text is centered // or right-aligned, tab characters are simply replaced with [TabSize] spaces. // +// Word wrapping is enabled by default. Use [TextView.SetWrap] and +// [TextView.SetWordWrap] to change this. +// // # Navigation // // If the text view is set to be scrollable (which is the default), text is kept @@ -246,6 +249,7 @@ func NewTextView() *TextView { scrollable: true, align: AlignLeft, wrap: true, + wordWrap: true, textStyle: tcell.StyleDefault.Background(Styles.PrimitiveBackgroundColor).Foreground(Styles.PrimaryTextColor), regionTags: false, styleTags: false,