killLine(); // clear to the end of the line
/** * Possible states in which the current readline operation may be in. */ private static enum State { /** * The user is just typing away */ NORMAL, /** * In the middle of a emacs seach */ SEARCH, FORWARD_SEARCH, /** * VI "yank-to" operation ("y" during move mode) */ VI_YANK_TO, /** * VI "delete-to" operation ("d" during move mode) */ VI_DELETE_TO, /** * VI "change-to" operation ("c" during move mode) */ VI_CHANGE_TO }
private void closeImpl() { try { reader.killLine(); reader.flush(); } catch (IOException ex) { ex.printStackTrace(); } } }
/** * Shuts down all handlers and the reader. */ public void shutdownAll() { for (Handler handler : getHandlers()) { handler.close(); } try { this.reader.killLine(); } catch (IOException e) { e.printStackTrace(); } }
killLine(); // clear to the end of the line
public void abortCurrentRead() throws IOException { this.reader.println(); this.reader.println("Keyboard Interrupt"); this.reader.println(); this.inputSoFar.setLength(0); this.reader.setCursorPosition(0); this.reader.killLine(); this.reader.setPrompt(lastPrompt); this.reader.redrawLine(); this.reader.flush(); }
/** * Possible states in which the current readline operation may be in. */ private static enum State { /** * The user is just typing away */ NORMAL, /** * In the middle of a emacs seach */ SEARCH, FORWARD_SEARCH, /** * VI "yank-to" operation ("y" during move mode) */ VI_YANK_TO, /** * VI "delete-to" operation ("d" during move mode) */ VI_DELETE_TO, /** * VI "change-to" operation ("c" during move mode) */ VI_CHANGE_TO }