expand right column
This commit is contained in:
parent
8d8c84cbf4
commit
8c6a7ce973
@ -95,7 +95,7 @@ func (lm *Manager) planAndLayoutColumns(g *gocui.Gui, area Area) (Area, error) {
|
|||||||
widths[idx] = -1
|
widths[idx] = -1
|
||||||
}
|
}
|
||||||
variableColumns := len(elements)
|
variableColumns := len(elements)
|
||||||
availableWidth := area.maxX
|
availableWidth := area.maxX + 1
|
||||||
|
|
||||||
// first pass: planout the column sizes based on the given requests
|
// first pass: planout the column sizes based on the given requests
|
||||||
for idx, element := range elements {
|
for idx, element := range elements {
|
||||||
|
@ -165,12 +165,12 @@ func Test_planAndLayoutColumns(t *testing.T) {
|
|||||||
columns: []*testElement{newTestElement(t, -1, Area{
|
columns: []*testElement{newTestElement(t, -1, Area{
|
||||||
minX: -1,
|
minX: -1,
|
||||||
minY: -1,
|
minY: -1,
|
||||||
maxX: 119,
|
maxX: 120,
|
||||||
maxY: 80,
|
maxY: 80,
|
||||||
}, LocationColumn)},
|
}, LocationColumn)},
|
||||||
expected: layoutReturn{
|
expected: layoutReturn{
|
||||||
area: Area{
|
area: Area{
|
||||||
minX: 119,
|
minX: 120,
|
||||||
minY: -1,
|
minY: -1,
|
||||||
maxX: 120,
|
maxX: 120,
|
||||||
maxY: 80,
|
maxY: 80,
|
||||||
@ -214,13 +214,13 @@ func Test_planAndLayoutColumns(t *testing.T) {
|
|||||||
newTestElement(t, -1, Area{
|
newTestElement(t, -1, Area{
|
||||||
minX: 29,
|
minX: 29,
|
||||||
minY: -1,
|
minY: -1,
|
||||||
maxX: 119,
|
maxX: 120,
|
||||||
maxY: 80,
|
maxY: 80,
|
||||||
}, LocationColumn),
|
}, LocationColumn),
|
||||||
},
|
},
|
||||||
expected: layoutReturn{
|
expected: layoutReturn{
|
||||||
area: Area{
|
area: Area{
|
||||||
minX: 119,
|
minX: 120,
|
||||||
minY: -1,
|
minY: -1,
|
||||||
maxX: 120,
|
maxX: 120,
|
||||||
maxY: 80,
|
maxY: 80,
|
||||||
@ -280,7 +280,7 @@ func Test_layout(t *testing.T) {
|
|||||||
Area{
|
Area{
|
||||||
minX: -1,
|
minX: -1,
|
||||||
minY: 0,
|
minY: 0,
|
||||||
maxX: 119,
|
maxX: 120,
|
||||||
maxY: 79,
|
maxY: 79,
|
||||||
}, LocationColumn),
|
}, LocationColumn),
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user