MCPcopy Create free account
hub / github.com/facebook/PathPicker / process_dirty

Method process_dirty

src/pathpicker/screen_control.py:660–675  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

658 self.dirty = True
659
660 def process_dirty(self) -> None:
661 if self.dirty:
662 self.print_all()
663 return
664 (_min_x, min_y, _max_x, max_y) = self.get_chrome_boundaries()
665 did_clear_line = False
666 for index in self.dirty_indexes:
667 y_pos = min_y + index + self.get_scroll_offset()
668 if min_y <= y_pos < max_y:
669 did_clear_line = True
670 self.clear_line(y_pos)
671 self.line_objs[index].output(self.color_printer)
672 if did_clear_line and self.helper_chrome.get_is_sidebar_mode():
673 # now we need to output the chrome again since on wide
674 # monitors we will have cleared out a line of the chrome
675 self.helper_chrome.output(self.mode)
676
677 def clear_line(self, y_pos: int) -> None:
678 """Clear a line of content, excluding the chrome"""

Callers 1

controlMethod · 0.95

Calls 6

print_allMethod · 0.95
get_chrome_boundariesMethod · 0.95
get_scroll_offsetMethod · 0.95
clear_lineMethod · 0.95
get_is_sidebar_modeMethod · 0.80
outputMethod · 0.45

Tested by

no test coverage detected