...
This commit is contained in:
parent
533b0ed591
commit
67fd07a92a
1 changed files with 5 additions and 4 deletions
|
|
@ -561,7 +561,8 @@ def destroy(self) -> None:
|
|||
del self.screen
|
||||
|
||||
def tab_at(self, x: int) -> Optional[int]:
|
||||
x = (x - self.window_geometry.left) // self.cell_width
|
||||
for i, (a, b) in enumerate(self.cell_ranges):
|
||||
if a <= x <= b:
|
||||
return i
|
||||
if self.laid_out_once:
|
||||
x = (x - self.window_geometry.left) // self.cell_width
|
||||
for i, (a, b) in enumerate(self.cell_ranges):
|
||||
if a <= x <= b:
|
||||
return i
|
||||
|
|
|
|||
Loading…
Reference in a new issue