mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: #1624 add shortcut for Shift + Option + Left/Right Arrow
This commit is contained in:
parent
06c5f6a790
commit
d7410cd6e8
@ -392,18 +392,15 @@ extension on Position {
|
|||||||
case _SelectionRange.character:
|
case _SelectionRange.character:
|
||||||
if (node is TextNode) {
|
if (node is TextNode) {
|
||||||
return Position(
|
return Position(
|
||||||
path: path, offset: node.delta.nextRunePosition(offset));
|
path: path,
|
||||||
|
offset: node.delta.nextRunePosition(offset),
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
return Position(path: path, offset: offset);
|
return Position(path: path, offset: offset);
|
||||||
}
|
}
|
||||||
case _SelectionRange.word:
|
case _SelectionRange.word:
|
||||||
if (node is TextNode) {
|
if (node is TextNode) {
|
||||||
final result = node.selectable?.getWordBoundaryInPosition(
|
final result = node.selectable?.getWordBoundaryInPosition(this);
|
||||||
Position(
|
|
||||||
path: path,
|
|
||||||
offset: node.delta.nextRunePosition(offset),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
return result.end;
|
return result.end;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user