File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ impl View for Page {
329329 // keep attr pos >= line start
330330 let ( pos, attr) = c. attrs [ attr_start] ;
331331 let head = ( max ( pos, text_start) , attr) ;
332- let tail = & c. attrs [ attr_start + 1 ..] ;
332+ let tail = & c. attrs [ attr_start + 1 ..attr_end ] ;
333333 let mut attrs_iter = iter:: once ( & head) . chain ( tail. iter ( ) ) . peekable ( ) ;
334334
335335 // seems like this should be simpler. use itertools?
@@ -527,7 +527,8 @@ impl Bk<'_> {
527527 while let Some ( view) = self . view {
528528 let pad = self . cols . saturating_sub ( self . max_width ) / 2 ;
529529
530- queue ! ( stdout, terminal:: Clear ( terminal:: ClearType :: All ) ) ?;
530+ // clearing the screen doesn't reset attributes wtf
531+ queue ! ( stdout, terminal:: Clear ( terminal:: ClearType :: All ) , Print ( Attribute :: Reset ) ) ?;
531532 for ( i, line) in view. render ( self ) . iter ( ) . enumerate ( ) {
532533 queue ! ( stdout, cursor:: MoveTo ( pad, i as u16 ) , Print ( line) ) ?;
533534 }
You can’t perform that action at this time.
0 commit comments