@@ -1792,7 +1792,9 @@ impl App {
17921792 /// Maximum scroll offset: stops when last line is at bottom of viewport
17931793 pub fn max_content_scroll ( & self ) -> u16 {
17941794 let viewport = self . content_viewport_height as usize ;
1795- self . content_height . saturating_sub ( viewport) . min ( u16:: MAX as usize ) as u16
1795+ self . content_height
1796+ . saturating_sub ( viewport)
1797+ . min ( u16:: MAX as usize ) as u16
17961798 }
17971799
17981800 /// Scroll content down by one line
@@ -2422,9 +2424,7 @@ impl App {
24222424 // Scroll to bring match line into view (center it if possible)
24232425 let half_viewport = self . content_viewport_height / 2 ;
24242426 self . content_scroll = match_line. saturating_sub ( half_viewport) ;
2425- self . content_scroll = self
2426- . content_scroll
2427- . min ( self . max_content_scroll ( ) ) ;
2427+ self . content_scroll = self . content_scroll . min ( self . max_content_scroll ( ) ) ;
24282428 self . content_scroll_state = self
24292429 . content_scroll_state
24302430 . position ( self . content_scroll as usize ) ;
@@ -5037,8 +5037,8 @@ impl App {
50375037 . and_then ( |text| self . document . find_heading ( text) )
50385038 . map ( |h| h. offset )
50395039 . unwrap_or ( 0 ) ;
5040- let content_before_section = & self . document . content
5041- [ ..section_start. min ( self . document . content . len ( ) ) ] ;
5040+ let content_before_section =
5041+ & self . document . content [ ..section_start. min ( self . document . content . len ( ) ) ] ;
50425042
50435043 // Count tables (groups of | lines) before section
50445044 let mut table_count_before = 0 ;
0 commit comments