int searchIndex = searchForwards(searchBuffer.toString(), index, true); if (searchIndex == -1) { history.moveToEnd(); if (!buf.toString().equals(historyBuffer.toString())) { setBuffer(historyBuffer.toString()); setBuffer(history.current()); } else { history.moveToEnd(); setBuffer(historyBuffer.toString()); return false; history.moveToEnd(); if (!buf.toString().equals(historyBuffer.toString())) { setBuffer(historyBuffer.toString());
protected void doCleanup(boolean nl) { buf.cursor(buf.length()); post = null; if (size.getColumns() > 0 || size.getRows() > 0) { redisplay(false); if (nl) { println(); } terminal.puts(Capability.keypad_local); terminal.trackMouse(Terminal.MouseTracking.Off); if (isSet(Option.BRACKETED_PASTE)) terminal.writer().write(BRACKETED_PASTE_OFF); flush(); } history.moveToEnd(); }