class method
ErrorHighlight::DefaultFormatter.terminal_width
terminal_width
lib/error_highlight/formatter.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/error_highlight/formatter.rb, line 58
def self.terminal_width
# lazy load io/console to avoid loading it when 'max_snippet_width' is manually set
require "io/console"
$stderr.winsize[1] if $stderr.tty?
rescue LoadError, NoMethodError, SystemCallError
# skip truncation when terminal window size is unavailable
end
No documentation available