Manages line reset in the console
9550
def reset_line(text = "")
      # Initialise ANSI escape string
      escape = ""

      # Get terminal window width
      cols = console_columns

      # The number of lines the previous message spanned
      lines = @@prev / cols

      # If cols == 80 and @@prev == 80, @@prev / cols == 1 but we don't want to
      # go up an extra line since it fits exactly
      lines -= 1 if @@prev % cols == 0

      # Clear and go up a line
      lines.times { escape += "#{ESC_R_AND_CLR}#{ESC_UP_A_LINE}" }

      # Clear the line that is to be printed on
      escape += "#{ESC_R_AND_CLR}"

      # Console is clear, we can print!
      $console.print "#{escape}#{text}"

      # Store the current message so we know how many lines it spans
      @@prev = text.to_s.length
    end
1123264
def clear_terminal(self):
        """"""
        self.clear()
        self.new_prompt(self.interpreter.p2 if self.interpreter.more else self.interpreter.p1)
1197809
def handle_line(self, frame, arg):
        """"""
        log.info('Stopping at line %s' % pretty_frame(frame))
        self.interaction(frame)
102850
def erase_line (self): # <ESC>[2K
        ''''''

        self.fill_region (self.cur_r, 1, self.cur_r, self.cols)
585563
private function reset()
    {
        $this->state   = self::IN_TEXT;
        $this->tagType = null;
        $this->buffer  = '';
        $this->tokens  = array();
        $this->seenTag = false;
        $this->line    = 0;
        $this->otag    = '{{';
        $this->ctag    = '}}';
        $this->otagLen = 2;
        $this->ctagLen = 2;
    }
193102
public function reset() {
        $this->processstarted = false;
        $this->linenb = 0;
        $this->cir->init();
        $this->errors = array();
    }
45452
public void resetCursor() {
        if(buffer == null) {
            buffer = Pointer.create(new byte[bufsize], 0);
        }
        buffer.buffer[buffer.start] = 0;
        cursor = -1;
        lineptr = -1;
        linectptr = -1;
        token = -1;
        toktmp = -1;
        marker = -1;
        limit = -1;

        root = null;
        root_on_error = null;
        linect = 0;
        eof = false;
        last_token = 0;
        force_token = 0;
    }
912671
function() {
    var oThis = this;

    var argsPassed = oThis._filterArgs(arguments);

    var args = [oThis.getPrefix(this.ERR_PRE)];
    args = args.concat(Array.prototype.slice.call(argsPassed));
    args.push(this.CONSOLE_RESET);
    console.log.apply(console, args);
  }
1157506
def _populate_lines(self, block, terminal, styles, default_esc_seq):
        '''
        '''
        for line in block:
            if hasattr(line, 'populate'):
                line = line.populate(terminal, styles, default_esc_seq)
            else:
                line = default_esc_seq + line
            yield line
866874
function resetState () {
  index = queue.length = 0
  has = {}
  /* istanbul ignore if */
  if (process.env.NODE_ENV !== 'production') {
    circular = {}
  }
  flushing = false
}
142795
def erase_up (self): # <ESC>[1J
        ''''''

        self.erase_start_of_line ()
        self.fill_region (self.cur_r-1, 1, 1, self.cols)
236308
def _reset(self, command, *args, **kwargs):
        
        if self.indexable:
            self.deindex()
        result = self._traverse_command(command, *args, **kwargs)
        if self.indexable:
            self.index()
        return result
829708
def reset(self):
        

        self.stream.write(self.normal_cursor)
        self.stream.write(self.csr(0, self.height))
        self.stream.write(self.move(self.height, 0))
909891
def _on_text_changed(self):
        
        if not self._cleaning:
            ln = TextHelper(self).cursor_position()[0]
            self._modified_lines.add(ln)
603229
def do_clearqueue(self, line):
        """"""
        self._split_args(line, 0, 0)
        self._command_processor.get_operation_queue().clear()
        self._print_info_if_verbose("All operations in the write queue were cleared")
1240400
def erase(self):
        """"""
        with self._at_last_line():
            self.stream.write(self._term.clear_eol)
        self.stream.flush()
1225466
def flush(self, draw_progress=True):
    """"""
    reset_progressbar = None
    if self._draw_progressbar and draw_progress:
      progressbar, reset_progressbar = self._draw_progressbar()
      self._buffer.append(progressbar)

    for line in self._buffer:
      self._outFile.write(line)
    #self._outFile.flush() needed?
    self._buffer = []
    if reset_progressbar:
      # first thing on next flush is to reset the current progressbar
      self._buffer.append(reset_progressbar)
    self._current_ticks = 0
    self._last_flush_time = time()