module TTY::Screen
def size_from_stty
- Api: - private
Returns:
-
(Array(Integer, Integer), nil)-
def size_from_stty return unless output.tty? && command_exist?("stty") out = run_command("stty", "size") return unless out size = out.split.map(&:to_i) size if nonzero_column?(size[1]) end