module Byebug::FrameFunctions

def print_frame(pos, mark_current = true)

def print_frame(pos, mark_current = true)
  file = @state.context.frame_file pos
  line = @state.context.frame_line pos
  unless Command.settings[:frame_fullpath]
    path_components = file.split(/[\\\/]/)
    if path_components.size > 3
      path_components[0...-3] = '...'
      file = path_components.join(File::ALT_SEPARATOR || File::SEPARATOR)
    end
  end
  if mark_current
    frame_str = (pos == @state.frame_pos) ? "--> " : "    "
  else
    frame_str = ""
  end
  frame_str += sprintf "#%-2d ", pos
  frame_str += get_frame_call frame_str, pos
  file_line = "at #{CommandProcessor.canonic_file(file)}:#{line}"
  if frame_str.size + file_line.size + 1 > Command.settings[:width]
    frame_str += "\n      #{file_line}\n"
  else
    frame_str += " #{file_line}\n"
  end
  print frame_str
end