pub enum WordWrap {
Off,
Viewport,
Column(u32),
Bounded(u32),
}Expand description
Where a code editor breaks a line too long for it onto the rows below.
A broken line is still one line of the document: its number is drawn on its first row only, Up, Down, Home and End follow the rows, and the lines on screen are reported as the document’s own. A line breaks after the last space that fits, or where a word is longer than the row, at the column itself.
Variants§
Off
No line breaks; a long line runs past the edge.
Viewport
At the edge of the view.
Column(u32)
At this many columns, whatever the width of the view.
Bounded(u32)
At this many columns, or at the edge of the view where that comes first.
Implementations§
Source§impl WordWrap
impl WordWrap
Sourcepub fn to_value(self) -> i64
pub fn to_value(self) -> i64
The integer the WordWrap property carries: the WordWrapMode tag in the low 16
bits and the column count above them.
Sourcepub fn from_value(value: i64) -> Option<Self>
pub fn from_value(value: i64) -> Option<Self>
Reads back what WordWrap::to_value wrote, or None where the mode is not one, the
value is below zero, or a mode that counts columns counts none.