Measure the width of text in the terminal and build simple layouts!
0

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'fix-otp-29-warnings' into 'main'

Fix deprecation warnings on OTP 29

See merge request arkandos/string-width!2

+5 -4
+5 -4
src/string_width_ffi.erl
··· 27 27 {_, false} -> 28 28 {error, nil}; 29 29 {LinesStr, ColumnsStr} -> 30 - case catch {list_to_integer(LinesStr), list_to_integer(ColumnsStr)} of 31 - {EnvRows, EnvCols} when is_integer(EnvRows) andalso is_integer(EnvCols) -> 32 - {ok, {EnvRows, EnvCols}}; 33 - _ -> 30 + try {list_to_integer(LinesStr), list_to_integer(ColumnsStr)} of 31 + {EnvRows, EnvCols} -> 32 + {ok, {EnvRows, EnvCols}} 33 + catch 34 + _:_ -> 34 35 {error, nil} 35 36 end 36 37 end