def undo_delete
        # added 2008-11-27 12:43  paste delete buffer into insertion point
        return if @delete_buffer.nil?
        $log.warn "undo_delete is broken! perhaps cannot be used . textarea 347 "
        # FIXME - can be an array
        case @delete_buffer
        when Array
          # we need to unroll array, and it could be lines not just a string
          str = @delete_buffer.first
        else
          str = @delete_buffer
        end
        @buffer.insert @curpos, str 
        set_modified 
        fire_handler :CHANGE, InputDataEvent.new(@curpos,@curpos+@delete_buffer.length, self, :INSERT, @current_index, @delete_buffer)     #  2008-12-24 18:34 
    end
def undo_delete
        # added 2008-11-27 12:43  paste delete buffer into insertion point
        return if @delete_buffer.nil?
        $log.warn "undo_delete is broken! perhaps cannot be used . textarea 347 "
        # FIXME - can be an array
        case @delete_buffer
        when Array
          # we need to unroll array, and it could be lines not just a string
          str = @delete_buffer.first
        else
          str = @delete_buffer
        end
        @buffer.insert @curpos, str 
        set_modified 
        fire_handler :CHANGE, InputDataEvent.new(@curpos,@curpos+@delete_buffer.length, self, :INSERT, @current_index, @delete_buffer)     #  2008-12-24 18:34 
    end
this is broken, delete_buffer could be a line or a string or array of lines