Updated RangeMap to Add Clear().
This commit is contained in:
parent
b9fef72f76
commit
8614a7a398
3 changed files with 5 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ sys-locale = { version = "0.2.3", optional = true }
|
||||||
unicode-linebreak = "0.1.4"
|
unicode-linebreak = "0.1.4"
|
||||||
unicode-script = "0.5.5"
|
unicode-script = "0.5.5"
|
||||||
unicode-segmentation = "1.10.0"
|
unicode-segmentation = "1.10.0"
|
||||||
rangemap = "1.1.0"
|
rangemap = "1.2.0"
|
||||||
|
|
||||||
[dependencies.unicode-bidi]
|
[dependencies.unicode-bidi]
|
||||||
version = "0.3.8"
|
version = "0.3.8"
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,9 @@ fn main() {
|
||||||
("O", attrs.color(Color::rgb(0xFF, 0xFF, 0x00))),
|
("O", attrs.color(Color::rgb(0xFF, 0xFF, 0x00))),
|
||||||
("R", attrs.color(Color::rgb(0xFF, 0x7F, 0x00))),
|
("R", attrs.color(Color::rgb(0xFF, 0x7F, 0x00))),
|
||||||
("N", attrs.color(Color::rgb(0xFF, 0x00, 0x00))),
|
("N", attrs.color(Color::rgb(0xFF, 0x00, 0x00))),
|
||||||
|
],
|
||||||
|
&[
|
||||||
|
("生活,삶,जिंदगी 😀 FPS", attrs.color(Color::rgb(0xFF, 0x00, 0x00)))
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
for &line in lines {
|
for &line in lines {
|
||||||
|
|
|
||||||
|
|
@ -251,8 +251,7 @@ impl AttrsList {
|
||||||
|
|
||||||
/// Clear the current attribute spans
|
/// Clear the current attribute spans
|
||||||
pub fn clear_spans(&mut self) {
|
pub fn clear_spans(&mut self) {
|
||||||
//Todo: Once clear is added Change this back to clear.
|
self.spans.clear();
|
||||||
self.spans = RangeMap::new();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Add an attribute span, removes any previous matching parts of spans
|
/// Add an attribute span, removes any previous matching parts of spans
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue