make print_msg always print to stderr

This commit is contained in:
Jonathan Wren 2022-04-16 16:16:48 -07:00
parent f142c912e2
commit 0fc8bcfbc2

View file

@ -9,6 +9,7 @@ from rich import print
from rich.panel import Panel from rich.panel import Panel
from rich.text import Text from rich.text import Text
from rich import box from rich import box
from rich.console import Console
from jrnl.color import RESET_COLOR from jrnl.color import RESET_COLOR
from jrnl.color import WARNING_COLOR from jrnl.color import WARNING_COLOR
@ -73,7 +74,8 @@ def print_msgs(msgs: list[Message], delimiter: str = "\n") -> None:
text.append(m) text.append(m)
text.rstrip() text.rstrip()
print(Panel(text, **kwargs))
Console(stderr=True).print(Panel(text, **kwargs))
def is_keyboard_int(msg: Message) -> bool: def is_keyboard_int(msg: Message) -> bool: