Skip to content

Commit

Permalink
fix: default color pair
Browse files Browse the repository at this point in the history
  • Loading branch information
mecaneer23 committed Apr 18, 2024
1 parent 375ec3c commit 7152754
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/acurses.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def curs_set(visibility: int) -> None:


window = _CursesWindow # pylint: disable=invalid-name
_color_pairs: list[int] = [FOREGROUND_DEFAULT]
_color_pairs: list[int] = [FOREGROUND_DEFAULT | BACKGROUND_DEFAULT]


def initscr() -> window:
Expand Down Expand Up @@ -297,7 +297,7 @@ def init_pair(pair_number: int, fg: int, bg: int) -> None:
arguments must be between 0 and COLORS - 1, or, after calling
use_default_colors(), -1.
"""
_color_pairs.insert(pair_number, fg | (max(bg, COLOR_BLACK) * 2**10))
_color_pairs.insert(pair_number, fg | max(bg * 2**10, BACKGROUND_DEFAULT))


def color_pair(pair_number: int) -> int:
Expand Down

0 comments on commit 7152754

Please sign in to comment.