pub enum Affinity {
Downstream,
Upstream,
}
Expand description
The “affinity” of a cursor which is sitting exactly on a line break.
We say “cursor” here rather than “caret” because (depending on presentation) the front-end may draw a cursor even when the region is not a caret.
Variants§
Downstream
The cursor should be displayed downstream of the line break. For example, if the buffer is “abcd”, and the cursor is on a line break after “ab”, it should be displayed on the second line before “cd”.
Upstream
The cursor should be displayed upstream of the line break. For example, if the buffer is “abcd”, and the cursor is on a line break after “ab”, it should be displayed on the previous line after “ab”.
Trait Implementations§
impl Copy for Affinity
impl Eq for Affinity
impl StructuralPartialEq for Affinity
Auto Trait Implementations§
impl Freeze for Affinity
impl RefUnwindSafe for Affinity
impl Send for Affinity
impl Sync for Affinity
impl Unpin for Affinity
impl UnwindSafe for Affinity
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more