repl: fix multiline truncation bug

For example, typing:

    type X
    a
    b
    c
    end<up><up><up><up><enter>

results in:

    julia> type X
           a
    julia> _
           c
           end

where _ is the cursor.