mirror of https://github.com/rivo/tview.git
Default is word-wrapping.
This commit is contained in:
parent
aef151e353
commit
15a8a86787
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue