lib/rbs/errors.rb in rbs-3.6.0.dev.1 vs lib/rbs/errors.rb in rbs-3.6.0.pre.1
- old
+ new
@@ -33,10 +33,10 @@
# Support only one line
return msg unless location.start_line == location.end_line
indent = " " * location.start_column
- marker = "^" * (location.end_column - location.start_column)
+ marker = "^" * ([location.end_column - location.start_column, 1].max or raise)
io = StringIO.new
io.puts msg
io.puts
io.print "\e[1m" if highlight