Fix #3804
This commit is contained in:
@@ -4,12 +4,13 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from typing import Callable, Dict, Generator, Iterable, Set, Tuple
|
|
||||||
from pprint import pformat
|
from pprint import pformat
|
||||||
|
from typing import Callable, Dict, Generator, Iterable, Set, Tuple
|
||||||
|
|
||||||
from .cli import green, title, version
|
from .cli import version
|
||||||
from .conf.utils import KeyAction
|
from .conf.utils import KeyAction
|
||||||
from .constants import is_macos, is_wayland
|
from .constants import is_macos, is_wayland
|
||||||
|
from kittens.tui.operations import colored
|
||||||
from .options.types import Options as KittyOpts, defaults
|
from .options.types import Options as KittyOpts, defaults
|
||||||
from .options.utils import MouseMap
|
from .options.utils import MouseMap
|
||||||
from .types import MouseEvent, SingleKey
|
from .types import MouseEvent, SingleKey
|
||||||
@@ -18,6 +19,14 @@ from .typing import SequenceMap
|
|||||||
ShortcutMap = Dict[Tuple[SingleKey, ...], KeyAction]
|
ShortcutMap = Dict[Tuple[SingleKey, ...], KeyAction]
|
||||||
|
|
||||||
|
|
||||||
|
def green(x: str) -> str:
|
||||||
|
return colored(x, 'green')
|
||||||
|
|
||||||
|
|
||||||
|
def title(x: str) -> str:
|
||||||
|
return colored(x, 'blue', intense=True)
|
||||||
|
|
||||||
|
|
||||||
def mod_to_names(mods: int) -> Generator[str, None, None]:
|
def mod_to_names(mods: int) -> Generator[str, None, None]:
|
||||||
from .fast_data_types import (
|
from .fast_data_types import (
|
||||||
GLFW_MOD_ALT, GLFW_MOD_CAPS_LOCK, GLFW_MOD_CONTROL, GLFW_MOD_HYPER,
|
GLFW_MOD_ALT, GLFW_MOD_CAPS_LOCK, GLFW_MOD_CONTROL, GLFW_MOD_HYPER,
|
||||||
|
|||||||
Reference in New Issue
Block a user