Refactor the cell rendering code for greater re-use
Also start work on CoreText based rendering
This commit is contained in:
@@ -8,6 +8,7 @@ import signal
|
||||
import shlex
|
||||
import subprocess
|
||||
import ctypes
|
||||
import math
|
||||
from collections import namedtuple
|
||||
from contextlib import contextmanager
|
||||
from functools import lru_cache
|
||||
@@ -30,6 +31,10 @@ def safe_print(*a, **k):
|
||||
pass
|
||||
|
||||
|
||||
def ceil_int(x):
|
||||
return int(math.ceil(x))
|
||||
|
||||
|
||||
@lru_cache(maxsize=2**13)
|
||||
def wcwidth(c: str) -> int:
|
||||
ans = min(2, wcwidth_native(c))
|
||||
|
||||
Reference in New Issue
Block a user