Skip to content

Commit

Permalink
add more debug info to editor
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenZcience committed Jan 21, 2024
1 parent 5e4f554 commit 5537ac8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cat_win/util/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,8 @@ def _render_scr(self) -> None:

status_bar = f"File: {self.file} | Exit: ^q | Save: ^s | Pos: {self.cpos.col}"
status_bar += f", {self.cpos.row} | {'NOT ' * self.unsaved_progress}Saved!"
if self.debug_mode:
status_bar += f" - Win: {self.wpos.col} {self.wpos.row} | {max_y}x{max_x}"
if len(status_bar) > max_x:
necc_space = max(0, max_x - (len(status_bar) - len(self.file) + 3))
status_bar = f"File: ...{self.file[-necc_space:] * bool(necc_space)} "
Expand Down

0 comments on commit 5537ac8

Please sign in to comment.