boolean moveLeft() throws IOException { return moveLeftBy(1) == 1; }
@Override void perform(Editor editor, EditorBuffer buffer) throws IOException { int cursor = buffer.getCursor(); if (cursor > 0) { buffer.moveLeftBy(cursor); } } };
@Override void perform(Editor editor, EditorBuffer buffer) throws IOException { int cursor = buffer.getCursor(); int pos = cursor; while (pos > 0) { char c = buffer.charAt(pos - 1); if ((atBeginning && Character.isLetterOrDigit(c)) || (!atBeginning && !Character.isLetterOrDigit(c))) { break; } else { pos--; } } while (pos > 0) { char c = buffer.charAt(pos - 1); if ((atBeginning && !Character.isLetterOrDigit(c)) || (!atBeginning && Character.isLetterOrDigit(c))) { break; } else { pos--; } } if (pos < cursor) { buffer.moveLeftBy(cursor - pos); } } }
boolean moveLeft() throws IOException { return moveLeftBy(1) == 1; }
boolean moveLeft() throws IOException { return moveLeftBy(1) == 1; }
@Override void perform(Editor editor, EditorBuffer buffer) throws IOException { int cursor = buffer.getCursor(); if (cursor > 0) { buffer.moveLeftBy(cursor); } } };
@Override void perform(Editor editor, EditorBuffer buffer) throws IOException { int cursor = buffer.getCursor(); if (cursor > 0) { buffer.moveLeftBy(cursor); } } };
@Override void perform(Editor editor, EditorBuffer buffer) throws IOException { int cursor = buffer.getCursor(); int pos = cursor; while (pos > 0) { char c = buffer.charAt(pos - 1); if ((atBeginning && Character.isLetterOrDigit(c)) || (!atBeginning && !Character.isLetterOrDigit(c))) { break; } else { pos--; } } while (pos > 0) { char c = buffer.charAt(pos - 1); if ((atBeginning && !Character.isLetterOrDigit(c)) || (!atBeginning && Character.isLetterOrDigit(c))) { break; } else { pos--; } } if (pos < cursor) { buffer.moveLeftBy(cursor - pos); } } }
@Override void perform(Editor editor, EditorBuffer buffer) throws IOException { int cursor = buffer.getCursor(); int pos = cursor; while (pos > 0) { char c = buffer.charAt(pos - 1); if ((atBeginning && Character.isLetterOrDigit(c)) || (!atBeginning && !Character.isLetterOrDigit(c))) { break; } else { pos--; } } while (pos > 0) { char c = buffer.charAt(pos - 1); if ((atBeginning && !Character.isLetterOrDigit(c)) || (!atBeginning && Character.isLetterOrDigit(c))) { break; } else { pos--; } } if (pos < cursor) { buffer.moveLeftBy(cursor - pos); } } }