diff --git a/src/acurses.py b/src/acurses.py index 0372bf2..cc34e57 100644 --- a/src/acurses.py +++ b/src/acurses.py @@ -93,7 +93,7 @@ def getch(self) -> int: def move(self, new_y: int, new_x: int) -> None: """Move cursor to (new_y, new_x)""" - stdout.write(f"\033[{self._begin_y + new_y + 1};{self._begin_x + new_x + 3}H") + stdout.write(f"\033[{self._begin_y + new_y + 1};{self._begin_x + new_x + 1}H") def _parse_attrs(self, attrs: int) -> str: """Convert a binary `attrs` into ANSI escape codes""" @@ -131,8 +131,7 @@ def addstr(self, *args: Any, **kwargs: Any) -> None: self._addstr(*args, **kwargs) @_addstr.register(str) - def _(self, text: str, attr: int = 0, _: None = None, __: None = None) -> None: - _ = __ + def _(self, text: str, attr: int = 0) -> None: ansi_attrs = self._parse_attrs(attr) stdout.write(f"{ansi_attrs}{text}{_ANSI_RESET if ansi_attrs else ''}") stdout.flush()