Skip to content

Commit

Permalink
Fix visual bugs in cyber (fox-it#738)
Browse files Browse the repository at this point in the history
  • Loading branch information
Schamper authored and otnxSl committed Jul 9, 2024
1 parent 2c88703 commit d8df205
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dissect/target/helpers/cyber.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def nms(buf: str, color: Optional[Color] = None, mask_space: bool = False, mask_

if (
("\n" in char or "\r\n" in char)
or (not mask_space and char == " " and not is_indent and not mask_indent)
or (not mask_space and char == " " and not is_indent)
or (not mask_indent and is_indent)
):
if "\n" in char:
Expand Down Expand Up @@ -189,7 +189,7 @@ def nms(buf: str, color: Optional[Color] = None, mask_space: bool = False, mask_

if (
("\n" in char or "\r\n" in char)
or (not mask_space and char == " " and not is_indent and not mask_indent)
or (not mask_space and char == " " and not is_indent)
or (not mask_indent and is_indent)
):
if "\n" in char:
Expand Down Expand Up @@ -268,6 +268,8 @@ def matrix(buf: str, color: Optional[Color] = None, **kwargs) -> None:

if cur_ansi:
char = cur_ansi + char + "\033[0m"
if end_ansi:
cur_ansi = ""

if "\n" in char or "\r\n" in char:
char = " " + char
Expand Down

0 comments on commit d8df205

Please sign in to comment.