Logo Search packages:      
Sourcecode: jline version File versions  Download package

final int jline::ConsoleReader::backspace ( final int  num  )  throws IOException [inline, private]

Issue num backspaces.

Returns:
the number of characters backed up

Definition at line 1252 of file ConsoleReader.java.

References drawBuffer(), and moveCursor().

      {
            if (buf.cursor == 0)
                  return 0;

            int count = 0;

            count = moveCursor (-1 * num) * -1;
            // debug ("Deleting from " + buf.cursor + " for " + count);

            buf.buffer.delete (buf.cursor, buf.cursor + count);
            drawBuffer (count);

            return count;
      }


Generated by  Doxygen 1.6.0   Back to index