mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-26 19:01:27 +00:00
Micro-optimization
This commit is contained in:
parent
4921b3d437
commit
ce8319de94
1 changed files with 2 additions and 1 deletions
|
|
@ -28,6 +28,7 @@ Savepoint = namedtuple("Savepoint", [
|
|||
"origin",
|
||||
"wrap"
|
||||
])
|
||||
IGNORED_CATEGORIES = ('Cc', 'Cf', 'Cn', 'Cs')
|
||||
|
||||
|
||||
class Screen(QObject):
|
||||
|
|
@ -298,7 +299,7 @@ class Screen(QObject):
|
|||
self._notify_cursor_position = False
|
||||
try:
|
||||
for char in self._decode(data):
|
||||
if unicodedata.category(char) in ('Cc', 'Cf', 'Cn', 'Cs'):
|
||||
if unicodedata.category(char) in IGNORED_CATEGORIES:
|
||||
continue
|
||||
char_width = wcwidth(char)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue