mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 09:25:38 +00:00
ui: get rid of Inf
It's not worth the special cases. Use a large value where needed (layout.List, text.Editor...) instead. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-2
@@ -159,9 +159,9 @@ func (e *Editor) Layout(cfg ui.Config, queue input.Queue, ops *ui.Ops, cs layout
|
||||
e.padLeft, e.padRight = twoDp, twoDp
|
||||
maxWidth := cs.Width.Max
|
||||
if e.SingleLine {
|
||||
maxWidth = ui.Inf
|
||||
maxWidth = inf
|
||||
}
|
||||
if maxWidth != ui.Inf {
|
||||
if maxWidth != inf {
|
||||
maxWidth -= e.padLeft + e.padRight
|
||||
}
|
||||
if maxWidth != e.maxWidth {
|
||||
|
||||
Reference in New Issue
Block a user