diff options
Diffstat (limited to 'pkg/field/set.go')
-rw-r--r-- | pkg/field/set.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/field/set.go b/pkg/field/set.go index 5044898..c4cf2a4 100644 --- a/pkg/field/set.go +++ b/pkg/field/set.go @@ -25,8 +25,8 @@ func (f *Field) Set(x, y, v int) { } l.columns = append(l.columns, v) l.l = newL - if f.lx-f.x < l.l-l.x { - f.lx = l.l - l.x + if f.lx < l.l+l.x-f.x { + f.lx = l.l + l.x - f.x } } } else { @@ -60,8 +60,8 @@ func (f *Field) Set(x, y, v int) { f.lx = f.lx + f.x - x f.x = x } - if f.lx-f.x < x { - f.lx = x - f.x + if f.lx < x-f.x+1 { + f.lx = x - f.x + 1 } } } else { @@ -79,7 +79,7 @@ func (f *Field) Set(x, y, v int) { f.lx = f.lx + f.x - x f.x = x } - if f.lx-f.x < x { + if f.lx < x-f.x+1 { f.lx = x - f.x + 1 } } |