diff options
author | Randy Lai <randy.cs.lai@gmail.com> | 2018-06-07 11:59:42 -0400 |
---|---|---|
committer | Jonathan Slenders <jonathan@slenders.be> | 2018-06-07 21:49:12 +0200 |
commit | e05d92aab30b33e68af4a82d2df81940c836cf7c (patch) | |
tree | 8339896c5cc9d7bb155445a8794b87e3891589bf | |
parent | bc578e239301431535ad141fb09aca62c0dfd5d1 (diff) |
10 ** 10 is long in python 2
-rw-r--r-- | prompt_toolkit/layout/containers.py | 2 | ||||
-rw-r--r-- | prompt_toolkit/layout/controls.py | 2 | ||||
-rw-r--r-- | prompt_toolkit/layout/menus.py | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/prompt_toolkit/layout/containers.py b/prompt_toolkit/layout/containers.py index d207b8b5..41672470 100644 --- a/prompt_toolkit/layout/containers.py +++ b/prompt_toolkit/layout/containers.py @@ -631,7 +631,7 @@ class FloatContainer(Container): postpone = (fl.xcursor is not None or fl.ycursor is not None) if postpone: - new_z_index = number + 10 ** 10 # Draw as late as possible, but keep the order. + new_z_index = number + 10 ** 8 # Draw as late as possible, but keep the order. screen.draw_with_z_index(z_index=new_z_index, draw_func=partial(self._draw_float, fl, screen, mouse_handlers, write_position, style, erase_bg, new_z_index)) else: diff --git a/prompt_toolkit/layout/controls.py b/prompt_toolkit/layout/controls.py index b387f87b..41598dd0 100644 --- a/prompt_toolkit/layout/controls.py +++ b/prompt_toolkit/layout/controls.py @@ -167,7 +167,7 @@ class UIContent(object): except ZeroDivisionError: # Return something very big. # (This can happen, when the Window gets very small.) - return 10 ** 10 + return 10 ** 8 else: if remainder: quotient += 1 # Like math.ceil. diff --git a/prompt_toolkit/layout/menus.py b/prompt_toolkit/layout/menus.py index 0dcddbae..4fa8896e 100644 --- a/prompt_toolkit/layout/menus.py +++ b/prompt_toolkit/layout/menus.py @@ -180,7 +180,7 @@ class CompletionsMenu(ConditionalContainer): # above anything else. We also want to make sure that the content is # visible at the point where we draw this menu. def __init__(self, max_height=None, scroll_offset=0, extra_filter=True, - display_arrows=False, z_index=10 ** 10): + display_arrows=False, z_index=10 ** 8): extra_filter = to_filter(extra_filter) display_arrows = to_filter(display_arrows) @@ -482,7 +482,7 @@ class MultiColumnCompletionsMenu(HSplit): to True, it shows the meta information at the bottom. """ def __init__(self, min_rows=3, suggested_max_column_width=30, - show_meta=True, extra_filter=True, z_index=10 ** 10): + show_meta=True, extra_filter=True, z_index=10 ** 8): show_meta = to_filter(show_meta) extra_filter = to_filter(extra_filter) |