From 41127e50abc3e126f953af5ad638f92d0848f9f1 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 22 Sep 2019 17:35:07 +0200 Subject: Move message rendering code to Message.render() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also: - rename format_chars to FORMAT_CHARS because it’s static constant - move Line, Message, and a few funcs/consts to a new poezio.ui module --- poezio/windows/base_wins.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'poezio/windows/base_wins.py') diff --git a/poezio/windows/base_wins.py b/poezio/windows/base_wins.py index ac6b4804..6a689067 100644 --- a/poezio/windows/base_wins.py +++ b/poezio/windows/base_wins.py @@ -20,10 +20,7 @@ from typing import Optional, Tuple, TYPE_CHECKING from poezio.theming import to_curses_attr, read_tuple -FORMAT_CHAR = '\x19' -# These are non-printable chars, so they should never appear in the input, -# I guess. But maybe we can find better chars that are even less risky. -format_chars = '\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x1A' +from poezio.ui.consts import FORMAT_CHAR if TYPE_CHECKING: from _curses import _CursesWindow # pylint: disable=E0611 -- cgit v1.2.3