class Byebug::JumpCommand

def execute

def execute
  return errmsg "\"jump\" must be followed by a line number\n" unless @match[1]
  return errmsg "Bad line number: " + @match[1] unless numeric?(@match[1])
  line = @match[1].to_i
  line = @state.context.frame_line(0) + line if @match[1][0] == '+' or @match[1][0] == '-'
  if line == @state.context.frame_line(0)
    CommandProcessor.print_location_and_text(@state.context.frame_file(0), line)
    return
  end
  file = @match[2]
  file = @state.context.frame_file(file.to_i) if numeric?(file)
  file = @state.context.frame_file(0) if !file
  case Byebug.context.jump(line, file)
  when 0
    @state.proceed
  when 1
    errmsg "Not possible to jump from here\n"
  when 2
    errmsg "Couldn't find debugged frame\n"
  when 3
    errmsg "Couldn't find active code at " + file + ":" + line.to_s + "\n"
  end
end