replace use of str::lines with BidiParagraphs
This commit is contained in:
parent
e298259dd5
commit
6e336ad1cd
2 changed files with 6 additions and 5 deletions
|
|
@ -9,8 +9,8 @@ use core::{cmp, fmt};
|
|||
use unicode_segmentation::UnicodeSegmentation;
|
||||
|
||||
use crate::{
|
||||
Attrs, AttrsList, BorrowedWithFontSystem, BufferLine, Color, FontSystem, LayoutGlyph,
|
||||
LayoutLine, ShapeLine, Shaping, Wrap,
|
||||
Attrs, AttrsList, BidiParagraphs, BorrowedWithFontSystem, BufferLine, Color, FontSystem,
|
||||
LayoutGlyph, LayoutLine, ShapeLine, Shaping, Wrap,
|
||||
};
|
||||
|
||||
/// Current cursor location
|
||||
|
|
@ -580,7 +580,7 @@ impl Buffer {
|
|||
shaping: Shaping,
|
||||
) {
|
||||
self.lines.clear();
|
||||
for line in text.lines() {
|
||||
for line in BidiParagraphs::new(text) {
|
||||
self.lines.push(BufferLine::new(
|
||||
line.to_string(),
|
||||
AttrsList::new(attrs),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue