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

boolean jline::ConsoleReader::killLine (  )  throws IOException [inline]

Kill the buffer ahead of the current cursor position.

Returns:
true if successful

Definition at line 749 of file ConsoleReader.java.

References clearAhead().

Referenced by readLine(), and setBuffer().

      {
            int cp = buf.cursor;
            int len = buf.buffer.length ();
            if (cp >= len)
                  return false;

            int num = buf.buffer.length () - cp;
            clearAhead (num);
            for (int i = 0; i < num; i++)
                  buf.buffer.deleteCharAt (len - i - 1);
            return true;
      }


Generated by  Doxygen 1.6.0   Back to index