Skip to content

CellView.Size() clips all models to a maximum of 2x2 cells #553

Closed
@chrBrd

Description

@chrBrd

According to the comments in this function it's supposed to return a minimum 2x2 square:

// Size returns the content size, based on the model.
func (a *CellView) Size() (int, int) {
	// We always return a minimum of two rows, and two columns.
	w, h := a.model.GetBounds()
	// Clip to a 2x2 minimum square; we can scroll within that.
	if w > 2 {
		w = 2
	}
	if h > 2 {
		h = 2
	}
	return w, h
}

However the comparison operators are incorrect, so it's actually returning a maximum 2x2 square

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions