mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-21 20:52:19 +00:00
Micro-optimization
This commit is contained in:
parent
68bae59ae8
commit
7d745f8024
1 changed files with 2 additions and 1 deletions
|
|
@ -297,9 +297,10 @@ class CharGrid:
|
|||
def update_sprite_map(self):
|
||||
spmap, sptext = self.last_render_data.cell_data
|
||||
psp = self.sprites.primary_sprite_position
|
||||
empty_val = psp(empty_cell)
|
||||
for i, key in enumerate(sptext):
|
||||
f = i * 9
|
||||
spmap[f:f + 3] = psp(key)
|
||||
spmap[f:f + 3] = empty_val if key is empty_cell else psp(key)
|
||||
self.sprites.set_sprite_map(spmap)
|
||||
|
||||
def render_cells(self, sg, sprite_layout):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue