Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Properly document Display.max_height()

  • Loading branch information...
commit 14da40b8006d15c7a94b8c3daf03fccffc3dc7e0 1 parent c48ab27
@sjbach authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/lusty/display.rb
View
9 src/lusty/display.rb
@@ -219,9 +219,18 @@ def close
end
def self.max_height
+ # Compute the height of the display if it were grow to take up
+ # all available space, squishing every other Vim window to its
+ # minimal size.
+
stored_height = $curwin.height
+
+ # Ask for the world...
$curwin.height = VIM::MOST_POSITIVE_INTEGER
+ # ...Take what we can get. Here, $curwin.height does not equal
+ # VIM::MOST_POSITIVE_INTEGER.
highest_allowable = $curwin.height
+
$curwin.height = stored_height
highest_allowable
end
Please sign in to comment.
Something went wrong with that request. Please try again.