Skip to content

Commit

Permalink
Update selection when arrow keys are pressed
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoburns committed Sep 20, 2024
1 parent ded16f4 commit af043b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions parley/src/editor/selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ impl<T: Selectable> TextWithSelection<T> {
self.selection =
Some(Selection::caret(offset, Affinity::Downstream));
};
self.needs_selection_update = true;
}
}
Handled::Yes
Expand All @@ -156,6 +157,7 @@ impl<T: Selectable> TextWithSelection<T> {
} else if let Some(o) = t.next_grapheme_offset(selection.active) {
self.selection = Some(Selection::caret(o, Affinity::Upstream));
};
self.needs_selection_update = true;
}
}
Handled::Yes
Expand Down

0 comments on commit af043b8

Please sign in to comment.