pub fn update(&mut self, cell: RenderableCell) {
        for flag in &[Flags::UNDERLINE, Flags::STRIKEOUT] {
            if !cell.flags.contains(*flag) {
                continue;
            }

            // Check if there's an active line
            if let Some(line) = self.inner.get_mut(flag).and_then(|lines| lines.last_mut()) {
                if cell.fg == line.color
                    && cell.column == line.end.col + 1
                    && cell.line == line.end.line
                {
                    // Update the length of the line
                    line.end = cell.into();
                    continue;
                }
            }

            // Start new line if there currently is none
            let line = RenderLine { start: cell.into(), end: cell.into(), color: cell.fg };
            match self.inner.get_mut(flag) {
                Some(lines) => lines.push(line),
                None => {
                    self.inner.insert(*flag, vec![line]);
                },
            }
        }
    }
/// Update the stored lines with the next cell info.
Update the stored lines with the next cell info.
Update the stored lines with the next cell info .
pub fn update(&mut self, cell: RenderableCell) {
        for flag in &[Flags::UNDERLINE, Flags::STRIKEOUT] {
            if !cell.flags.contains(*flag) {
                continue;
            }
            // Check if there's an active line
            if let Some(line) = self.inner.get_mut(flag).and_then(|lines| lines.last_mut()) {
                if cell.fg == line.color
                    && cell.column == line.end.col + 1
                    && cell.line == line.end.line
                {
                    // Update the length of the line
                    line.end = cell.into();
                    continue;
                }
            }
            // Start new line if there currently is none
            let line = RenderLine { start: cell.into(), end: cell.into(), color: cell.fg };
            match self.inner.get_mut(flag) {
                Some(lines) => lines.push(line),
                None => {
                    self.inner.insert(*flag, vec![line]);
                },
            }
        }
    }
pub fn update ( & mut self , cell : RenderableCell ) { for flag in & [ Flags :: UNDERLINE , Flags :: STRIKEOUT ] { if ! cell . flags . contains ( * flag ) { continue ; } // Check if there's an active line if let Some ( line ) = self . inner . get_mut ( flag ) . and_then ( | lines | lines . last_mut ( ) ) { if cell . fg == line . color && cell . column == line . end . col + 1 && cell . line == line . end . line { // Update the length of the line line . end = cell . into ( ) ; continue ; } } // Start new line if there currently is none let line = RenderLine { start : cell . into ( ) , end : cell . into ( ) , color : cell . fg } ; match self . inner . get_mut ( flag ) { Some ( lines ) => lines . push ( line ) , None => { self . inner . insert ( * flag , vec ! [ line ] ) ; } , } } }
Update the stored lines with the next cell info.
Update the stored lines with the next cell info .
&mut self
cell
RenderableCell