mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-18 22:44:50 +02:00
Use pending updates for unicode input kitten
Avoids all possibility of flicker
This commit is contained in:
@@ -147,6 +147,16 @@ class Handler:
|
||||
def pending_update(self) -> ContextManager[None]:
|
||||
return pending_update(self.write)
|
||||
|
||||
@classmethod
|
||||
def with_pending_update(cls, func: Callable) -> Callable:
|
||||
from functools import wraps
|
||||
|
||||
@wraps(func)
|
||||
def f(*a: Any, **kw: Any) -> Any:
|
||||
with a[0].pending_update():
|
||||
return func(*a, **kw)
|
||||
return f
|
||||
|
||||
|
||||
class HandleResult:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user