From 38fb530b60dbe5c9e36a4d86d2a771c644ac8d86 Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Thu, 19 Jan 2023 10:52:16 -0700 Subject: [PATCH] Remove max screen dimension limits cuz cringe --- lib/chessh/ssh/client/client.ex | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/chessh/ssh/client/client.ex b/lib/chessh/ssh/client/client.ex index 72bbb66..3aaed07 100644 --- a/lib/chessh/ssh/client/client.ex +++ b/lib/chessh/ssh/client/client.ex @@ -11,8 +11,6 @@ defmodule Chessh.SSH.Client do @min_terminal_width 64 @min_terminal_height 38 - @max_terminal_width 220 - @max_terminal_height 100 defmodule State do defstruct tui_pid: nil, @@ -163,13 +161,10 @@ defmodule Chessh.SSH.Client do end defp get_terminal_dim_msg(width, height) do - case {height > @max_terminal_height, height < @min_terminal_height, - width > @max_terminal_width, width < @min_terminal_width} do - {true, _, _, _} -> {true, @clear_codes ++ ["The terminal height is too large."]} - {_, true, _, _} -> {true, @clear_codes ++ ["The terminal height is too small."]} - {_, _, true, _} -> {true, @clear_codes ++ ["The terminal width is too large"]} - {_, _, _, true} -> {true, @clear_codes ++ ["The terminal width is too small."]} - {false, false, false, false} -> {false, nil} + case {height < @min_terminal_height, width < @min_terminal_width} do + {true, _} -> {true, @clear_codes ++ ["The terminal height is too small."]} + {_, true} -> {true, @clear_codes ++ ["The terminal width is too small."]} + {false, false} -> {false, nil} end end