Final part of fix for getting two different resizes of the terminal which vim wasn't handling.

This commit is contained in:
Stephen Boddy 2017-02-06 07:38:47 +01:00
parent a0ba2cf969
commit 1d63446d03
1 changed files with 1 additions and 1 deletions

View File

@ -472,7 +472,7 @@ class Paned(Container):
self.set_position(self.get_position())
def position_by_ratio(self, total_size, handle_size, ratio):
non_separator_size = max(total_size, handle_size, 0)
non_separator_size = max(total_size - handle_size, 0)
ratio = min(max(ratio, 0.0), 1.0)
return int(round(non_separator_size * ratio))