mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 01:45:36 +00:00
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:
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user