MCPcopy
hub / github.com/wagoodman/dive / toggleCollapse

Method toggleCollapse

runtime/ui/view/filetree.go:286–293  ·  view source on GitHub ↗

getAbsPositionNode determines the selected screen cursor's location in the file tree, returning the selected FileNode. func (controller *FileTree) getAbsPositionNode() (node *filetree.FileNode) { return controller.vm.getAbsPositionNode(filterRegex()) } ToggleCollapse will collapse/expand the select

()

Source from the content-addressed store, hash-verified

284
285// ToggleCollapse will collapse/expand the selected FileNode.
286func (v *FileTree) toggleCollapse() error {
287 err := v.vm.ToggleCollapse(v.filterRegex)
288 if err != nil {
289 return err
290 }
291 _ = v.Update()
292 return v.Render()
293}
294
295// ToggleCollapseAll will collapse/expand the all directories.
296func (v *FileTree) toggleCollapseAll() error {

Callers

nothing calls this directly

Calls 3

UpdateMethod · 0.95
RenderMethod · 0.95
ToggleCollapseMethod · 0.80

Tested by

no test coverage detected