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

final void jline::ConsoleReader::moveInternal ( final int  where  )  throws IOException [inline, private]

Move the cursor where characters, withough checking the current buffer.

See also:
where
Parameters:
where the number of characters to move to the right or left.

Definition at line 1388 of file ConsoleReader.java.

References mask, NULL_MASK, and printCharacters().

Referenced by moveCursor().

      {
            // debug ("move cursor " + where + " ("
                  // + buf.cursor + " => " + (buf.cursor + where) + ")");

            buf.cursor += where;

            char c;

            if (where < 0)
            {
                  c = BACKSPACE;
            }
            else if (buf.cursor == 0)
            {
                  return;
            }
            else
            {
                  c = buf.buffer.charAt (buf.cursor - 1); // draw replacement
            }

            // null character mask: don't output anything
            if (NULL_MASK.equals (mask))
                  return;

            printCharacters (c, Math.abs (where));
      }


Generated by  Doxygen 1.6.0   Back to index