Remove max screen dimension limits cuz cringe

This commit is contained in:
Logan Hunt 2023-01-19 10:52:16 -07:00 committed by GitHub
parent 390db1128b
commit 38fb530b60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,8 +11,6 @@ defmodule Chessh.SSH.Client do
@min_terminal_width 64 @min_terminal_width 64
@min_terminal_height 38 @min_terminal_height 38
@max_terminal_width 220
@max_terminal_height 100
defmodule State do defmodule State do
defstruct tui_pid: nil, defstruct tui_pid: nil,
@ -163,13 +161,10 @@ defmodule Chessh.SSH.Client do
end end
defp get_terminal_dim_msg(width, height) do defp get_terminal_dim_msg(width, height) do
case {height > @max_terminal_height, height < @min_terminal_height, case {height < @min_terminal_height, width < @min_terminal_width} do
width > @max_terminal_width, width < @min_terminal_width} do {true, _} -> {true, @clear_codes ++ ["The terminal height is too small."]}
{true, _, _, _} -> {true, @clear_codes ++ ["The terminal height is too large."]} {_, true} -> {true, @clear_codes ++ ["The terminal width is too small."]}
{_, true, _, _} -> {true, @clear_codes ++ ["The terminal height is too small."]} {false, false} -> {false, nil}
{_, _, 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}
end end
end end