From 7d745f80245c8316127c736514a2c0d6aa65dcc2 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 30 Oct 2016 21:33:57 +0530 Subject: [PATCH] Micro-optimization --- kitty/char_grid.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kitty/char_grid.py b/kitty/char_grid.py index 7e0f48678..702d5be35 100644 --- a/kitty/char_grid.py +++ b/kitty/char_grid.py @@ -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):