WrapAtWords configures the text widget so that it automatically wraps lines that are longer than the width of the widget at word boundaries. If not provided, long lines are trimmed instead.
()
| 113 | // that are longer than the width of the widget at word boundaries. If not |
| 114 | // provided, long lines are trimmed instead. |
| 115 | func WrapAtWords() Option { |
| 116 | return option(func(opts *options) { |
| 117 | opts.wrapMode = wrap.AtWords |
| 118 | }) |
| 119 | } |
| 120 | |
| 121 | // WrapAtRunes configures the text widget so that it automatically wraps lines |
| 122 | // that are longer than the width of the widget at rune boundaries. If not |