File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99* Optionally defer auto-completions until a minimum number of characters is typed.
1010* Make the completion interface more responsive using a background thread.
1111* Option to suppress control-d exit behavior.
12+ * Better support Truecolor terminals.
1213
1314
1415Bug Fixes
Original file line number Diff line number Diff line change 4242from prompt_toolkit .key_binding .key_processor import KeyPressEvent
4343from prompt_toolkit .layout .processors import ConditionalProcessor , HighlightMatchingBracketProcessor
4444from prompt_toolkit .lexers import PygmentsLexer
45+ from prompt_toolkit .output import ColorDepth
4546from prompt_toolkit .shortcuts import CompleteStyle , PromptSession
4647import pymysql
4748from pymysql .constants .ER import HANDSHAKE_ERROR
@@ -1168,6 +1169,7 @@ def one_iteration(text: str | None = None) -> None:
11681169 editing_mode = EditingMode .EMACS
11691170
11701171 self .prompt_app = PromptSession (
1172+ color_depth = ColorDepth .DEPTH_24_BIT if 'truecolor' in os .getenv ('COLORTERM' , '' ).lower () else None ,
11711173 lexer = PygmentsLexer (MyCliLexer ),
11721174 reserve_space_for_menu = self .get_reserved_space (),
11731175 message = get_message ,
You can’t perform that action at this time.
0 commit comments