MCPcopy
hub / github.com/jesseduffield/lazygit / getLineCount

Method getLineCount

pkg/integration/components/view_driver.go:574–582  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

572}
573
574func (self *ViewDriver) getLineCount() int {
575 // can't rely entirely on view.BufferLines because it returns 1 even if there's nothing in the view
576 if strings.TrimSpace(self.getView().Buffer()) == "" {
577 return 0
578 }
579
580 view := self.getView()
581 return len(view.BufferLines())
582}
583
584func (self *ViewDriver) IsVisible() *ViewDriver {
585 self.t.assertWithRetries(func() (bool, string) {

Callers 1

LineCountMethod · 0.95

Calls 2

BufferMethod · 0.80
BufferLinesMethod · 0.80

Tested by

no test coverage detected