ui/text: rename Center Alignment to Middle and drop IsNewline

Middle matches the similar layout.Middle constant, and IsNewline is
too simple to export.

Add documentation while we're here.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-08-11 19:25:50 +02:00
parent 628a97cd71
commit 2f9ac5aebb
4 changed files with 44 additions and 16 deletions
+1 -1
View File
@@ -334,7 +334,7 @@ func (e *Editor) layoutText() {
// up all available space.
if len(s) > 0 {
r, _ := utf8.DecodeLastRuneInString(s)
if !IsNewline(r) {
if r != '\n' {
dims.Size.X = e.maxWidth
break
}