Skip to content

Commit d7410cd

Browse files
committed
feat: #1624 add shortcut for Shift + Option + Left/Right Arrow
1 parent 06c5f6a commit d7410cd

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

frontend/app_flowy/packages/appflowy_editor/lib/src/service/internal_key_event_handlers/arrow_keys_handler.dart

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -392,18 +392,15 @@ extension on Position {
392392
case _SelectionRange.character:
393393
if (node is TextNode) {
394394
return Position(
395-
path: path, offset: node.delta.nextRunePosition(offset));
395+
path: path,
396+
offset: node.delta.nextRunePosition(offset),
397+
);
396398
} else {
397399
return Position(path: path, offset: offset);
398400
}
399401
case _SelectionRange.word:
400402
if (node is TextNode) {
401-
final result = node.selectable?.getWordBoundaryInPosition(
402-
Position(
403-
path: path,
404-
offset: node.delta.nextRunePosition(offset),
405-
),
406-
);
403+
final result = node.selectable?.getWordBoundaryInPosition(this);
407404
if (result != null) {
408405
return result.end;
409406
}

0 commit comments

Comments
 (0)