Expand description
Paragraph Cursor
Fields
paragraph: usize
0 is first paragraph, and so on.
Note that a single paragraph can span multiple rows.
(a paragraph is text separated by \n
).
offset: usize
Character based (NOT bytes). It is fine if this points to something beyond the end of the current paragraph. When moving up/down it may again be within the next paragraph.
prefer_next_row: bool
If this cursors sits right at the border of a wrapped row break (NOT paragraph break) do we prefer the next row? This is almost always what you want, except for when explicitly clicking the end of a row or pressing the end key.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for PCursor
impl<'de> Deserialize<'de> for PCursor
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<PCursor> for PCursor
impl PartialEq<PCursor> for PCursor
Two PCursor
s are considered equal if they refer to the same character boundary,
even if one prefers the start of the next row.
impl Copy for PCursor
Auto Trait Implementations
impl RefUnwindSafe for PCursor
impl Send for PCursor
impl Sync for PCursor
impl Unpin for PCursor
impl UnwindSafe for PCursor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more