mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-13 12:08:45 +02:00
Simplify chained comparisions
This commit is contained in:
@@ -88,7 +88,7 @@ def set_font_family(opts=None, override_font_size=None, debug_font_matching=Fals
|
||||
|
||||
def add_line(buf, cell_width, position, thickness, cell_height):
|
||||
y = position - thickness // 2
|
||||
while thickness > 0 and y > -1 and y < cell_height:
|
||||
while thickness > 0 and -1 < y < cell_height:
|
||||
thickness -= 1
|
||||
ctypes.memset(ctypes.addressof(buf) + (cell_width * y), 255, cell_width)
|
||||
y += 1
|
||||
|
||||
Reference in New Issue
Block a user