diff options
Diffstat (limited to 'lib/error_highlight/formatter.rb')
| -rw-r--r-- | lib/error_highlight/formatter.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/error_highlight/formatter.rb b/lib/error_highlight/formatter.rb index 5180576405..d2fad9e75c 100644 --- a/lib/error_highlight/formatter.rb +++ b/lib/error_highlight/formatter.rb @@ -56,11 +56,11 @@ module ErrorHighlight end def self.terminal_width - # lazy load io/console, so it's not loaded when 'max_snippet_width' is set + # 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 - # do not truncate when window size is not available + # skip truncation when terminal window size is unavailable end end |
