Make the clickable range of No the same as Yes

Since the two options are treated equally, the same amount of mouse
clickable range are given.
This commit is contained in:
pagedown
2022-01-22 02:41:52 +08:00
parent 17e31565e2
commit 4dd29c726a

View File

@@ -222,7 +222,7 @@ class Choose(Handler):
extra = (self.screen_size.cols - w) // 2
x = extra
nx = x + wcswidth(yes) + len(sep)
self.clickable_ranges = {'y': Range(x, x + wcswidth(yes) - 1, y), 'n': Range(nx, nx + 1, y)}
self.clickable_ranges = {'y': Range(x, x + wcswidth(yes) - 1, y), 'n': Range(nx, nx + 2, y)}
self.print(' ' * extra + text, end='')
def on_text(self, text: str, in_bracketed_paste: bool = False) -> None: