Default is word-wrapping.

This commit is contained in:
Oliver 2023-09-07 10:24:44 +02:00
parent aef151e353
commit 15a8a86787
1 changed files with 4 additions and 0 deletions

View File

@ -63,6 +63,9 @@ func (w TextViewWriter) HasFocus() bool {
// screen columns, but only if the text is left-aligned. If the text is centered // 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. // 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 // # Navigation
// //
// If the text view is set to be scrollable (which is the default), text is kept // 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, scrollable: true,
align: AlignLeft, align: AlignLeft,
wrap: true, wrap: true,
wordWrap: true,
textStyle: tcell.StyleDefault.Background(Styles.PrimitiveBackgroundColor).Foreground(Styles.PrimaryTextColor), textStyle: tcell.StyleDefault.Background(Styles.PrimitiveBackgroundColor).Foreground(Styles.PrimaryTextColor),
regionTags: false, regionTags: false,
styleTags: false, styleTags: false,