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

Method filterWithString

pkg/integration/clients/tui.go:230–241  ·  view source on GitHub ↗
(needle string)

Source from the content-addressed store, hash-verified

228}
229
230func (self *app) filterWithString(needle string) {
231 if needle == "" {
232 self.filteredTests = self.allTests
233 } else {
234 self.filteredTests = lo.Filter(self.allTests, func(test *components.IntegrationTest, _ int) bool {
235 return strings.Contains(test.Name(), needle)
236 })
237 }
238
239 self.renderTests()
240 self.g.Update(func(g *gocui.Gui) error { return nil })
241}
242
243func (self *app) renderTests() {
244 self.listView.Clear()

Callers 1

wrapEditorMethod · 0.95

Calls 5

renderTestsMethod · 0.95
FilterMethod · 0.80
ContainsMethod · 0.80
UpdateMethod · 0.65
NameMethod · 0.45

Tested by

no test coverage detected