Update cosmic-text, fixing CRLF handling (#64)
This commit is contained in:
parent
42cade3149
commit
0fa09ab57b
2 changed files with 25 additions and 19 deletions
|
|
@ -1,5 +1,6 @@
|
|||
use cosmic_text::{
|
||||
Align, Attrs, AttrsList, BufferLine, Family, FontSystem, LayoutLine, ShapeBuffer, Shaping, Wrap,
|
||||
Align, Attrs, AttrsList, BufferLine, Family, FontSystem, LayoutLine, LineEnding, ShapeBuffer,
|
||||
Shaping, Wrap,
|
||||
};
|
||||
use std::collections::HashMap;
|
||||
|
||||
|
|
@ -32,7 +33,12 @@ impl LineNumberCache {
|
|||
//TODO: do not repeat, used in App::init
|
||||
let attrs = Attrs::new().family(Family::Monospace);
|
||||
let text = format!("{:width$}", key.number, width = key.width);
|
||||
let mut buffer_line = BufferLine::new(text, AttrsList::new(attrs), Shaping::Advanced);
|
||||
let mut buffer_line = BufferLine::new(
|
||||
text,
|
||||
LineEnding::default(),
|
||||
AttrsList::new(attrs),
|
||||
Shaping::Advanced,
|
||||
);
|
||||
buffer_line.set_align(Some(Align::Left));
|
||||
buffer_line
|
||||
.layout_in_buffer(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue