         @$pad.val(text_state[0])
         @$pad[0].selectionEnd = text_state[1][0]
         @$pad[0].selectionStart = text_state[1][1]
-        print "set scrollTop", text_state[2]
         @$holder.animate(scrollTop: text_state[2])
         @update()
 

            [start, end],
            @$holder.scrollTop(),
        ]
        print "get scrollTop", @$holder.scrollTop()
        return text_state

    show_promt: (p) ->

            lines = text.split("\n")
            start = 0
            for line, i in lines
                if i > 0
                    prev_mode = @lines[i-1][4]
                else
                    prev_mode = "plain"

                end = start + line.length + 1
                if @lines[i]?
                    oldline = @lines[i]
                    oldline[1] = start
                    oldline[2] = end
                    if oldline[3] != line
                        [colored, mode, html] = @tokenizer.tokenize(line, prev_mode)
                        oldline[3] = line
                        oldline[4] = mode
                        set_line(i, html)
                else
                    [colored, mode, html] = @tokenizer.tokenize(line, prev_mode)
                    @lines.push([i, start, end, line, mode])
                    add_line(i, html)
                start = end
            while lines.length < @lines.length
