@Override void perform(Editor editor, EditorBuffer buffer) throws IOException { int nextHistoryCursor = getNext(editor); if (nextHistoryCursor >= -1 && nextHistoryCursor < editor.history.size()) { String s = nextHistoryCursor == -1 ? editor.historyBuffer : editor.history.get(nextHistoryCursor); while (buffer.moveRight()) { // Do nothing } String t = buffer.replace(s); if (editor.historyCursor == -1) { editor.historyBuffer = t; } else { editor.history.set(editor.historyCursor, t); } editor.historyCursor = nextHistoryCursor; } } }
@Override String execute(Editor editor, EditorBuffer buffer, int[] sequence, boolean flush) throws IOException { buffer.moveRightBy(buffer.getSize() - buffer.getCursor()); buffer.replace(""); return null; } };
@Override void perform(Editor editor, EditorBuffer buffer) throws IOException { int nextHistoryCursor = getNext(editor); if (nextHistoryCursor >= -1 && nextHistoryCursor < editor.history.size()) { String s = nextHistoryCursor == -1 ? editor.historyBuffer : editor.history.get(nextHistoryCursor); while (buffer.moveRight()) { // Do nothing } String t = buffer.replace(s); if (editor.historyCursor == -1) { editor.historyBuffer = t; } else { editor.history.set(editor.historyCursor, t); } editor.historyCursor = nextHistoryCursor; } } }
@Override void perform(Editor editor, EditorBuffer buffer) throws IOException { int nextHistoryCursor = getNext(editor); if (nextHistoryCursor >= -1 && nextHistoryCursor < editor.history.size()) { String s = nextHistoryCursor == -1 ? editor.historyBuffer : editor.history.get(nextHistoryCursor); while (buffer.moveRight()) { // Do nothing } String t = buffer.replace(s); if (editor.historyCursor == -1) { editor.historyBuffer = t; } else { editor.history.set(editor.historyCursor, t); } editor.historyCursor = nextHistoryCursor; } } }
@Override String execute(Editor editor, EditorBuffer buffer, int[] sequence, boolean flush) throws IOException { buffer.moveRightBy(buffer.getSize() - buffer.getCursor()); buffer.replace(""); return null; } };
@Override String execute(Editor editor, EditorBuffer buffer, int[] sequence, boolean flush) throws IOException { buffer.moveRightBy(buffer.getSize() - buffer.getCursor()); buffer.replace(""); return null; } };