boolean moveRight() throws IOException { return moveRightBy(1) == 1; }
@Override void perform(Editor editor, EditorBuffer buffer) throws IOException { int cursor = editor.getCursorBound() - buffer.getCursor(); if (cursor > 0) { buffer.moveRightBy(cursor); } } };
@Override String execute(Editor editor, EditorBuffer buffer, int[] sequence, boolean flush) throws IOException { buffer.moveRightBy(buffer.getSize() - buffer.getCursor()); buffer.replace(""); return null; } };
buffer.moveRightBy(pos - from);
boolean moveRight() throws IOException { return moveRightBy(1) == 1; }
boolean moveRight() throws IOException { return moveRightBy(1) == 1; }
public void testMoveRightByTwoChars() throws Exception { resetConsole(); buffer.append("ab"); buffer.moveLeft(); buffer.moveLeft(); buffer.moveRightBy(2); buffer.append("c\n"); assertTrue(buffer.hasNext()); assertEquals("abc", buffer.next()); assertFalse(buffer.hasNext()); client.assertChars("abc"); }
@Override void perform(Editor editor, EditorBuffer buffer) throws IOException { int cursor = editor.getCursorBound() - buffer.getCursor(); if (cursor > 0) { buffer.moveRightBy(cursor); } } };
@Override void perform(Editor editor, EditorBuffer buffer) throws IOException { int cursor = editor.getCursorBound() - buffer.getCursor(); if (cursor > 0) { buffer.moveRightBy(cursor); } } };
@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; } };
buffer.moveRightBy(pos - from);
buffer.moveRightBy(pos - from);