lib/pry-moves/pry_ext.rb in pry-moves-0.1.4 vs lib/pry-moves/pry_ext.rb in pry-moves-0.1.5
- old
+ new
@@ -67,14 +67,21 @@
lines.join "\n"
end
def location
me = target.eval 'self' rescue nil
- if me
- colored_str = ''
- Pry::ColorPrinter.pp me, colored_str
- me = colored_str.chomp
- end
+ me = PryMoves::Painter.colorize me if me
file = defined?(Rails) ? @file.gsub(Rails.root.to_s, '') : @file
"#{file}:#{@line} #{me}"
end
end
+
+Pry.config.marker = "=>"
+Pry::Code::LOC.class_eval do
+
+ def add_marker(marker_lineno)
+ marker = lineno == marker_lineno ?
+ Pry.config.marker : " "
+ tuple[0] = " #{marker} #{ line }"
+ end
+
+end
\ No newline at end of file