From c740f2b9a387f9a465956108986aec74bedaf0f8 Mon Sep 17 00:00:00 2001 From: John Downey Date: Tue, 26 May 2026 20:59:36 -0500 Subject: [PATCH] Fix deprecation warnings on OTP 29 --- src/string_width_ffi.erl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/string_width_ffi.erl b/src/string_width_ffi.erl index cb2cbcb..34ab4c6 100644 --- a/src/string_width_ffi.erl +++ b/src/string_width_ffi.erl @@ -27,10 +27,11 @@ get_terminal_size() -> {_, false} -> {error, nil}; {LinesStr, ColumnsStr} -> - case catch {list_to_integer(LinesStr), list_to_integer(ColumnsStr)} of - {EnvRows, EnvCols} when is_integer(EnvRows) andalso is_integer(EnvCols) -> - {ok, {EnvRows, EnvCols}}; - _ -> + try {list_to_integer(LinesStr), list_to_integer(ColumnsStr)} of + {EnvRows, EnvCols} -> + {ok, {EnvRows, EnvCols}} + catch + _:_ -> {error, nil} end end -- 2.51.2