@@ -170,32 +170,31 @@ impl UiView for FunctionDiffUi {
170170
171171 let mut prev_text = None ;
172172 let mut prev_margin_text = None ;
173- if self . three_way {
174- if let Some ( ( obj, symbol_idx, symbol_diff) ) =
173+ if self . three_way
174+ && let Some ( ( obj, symbol_idx, symbol_diff) ) =
175175 get_symbol ( state. prev_obj . as_ref ( ) , self . prev_sym )
176- {
177- let mut text = Text :: default ( ) ;
178- let rect = content_chunks[ 4 ] . inner ( Margin :: new ( 0 , 1 ) ) ;
179- self . print_sym (
180- & mut text,
181- obj,
182- symbol_idx,
183- symbol_diff,
184- & state. diff_obj_config ,
185- rect,
186- & self . right_highlight ,
187- result,
188- true ,
189- ) ;
190- max_width = max_width. max ( text. width ( ) ) ;
191- prev_text = Some ( text) ;
176+ {
177+ let mut text = Text :: default ( ) ;
178+ let rect = content_chunks[ 4 ] . inner ( Margin :: new ( 0 , 1 ) ) ;
179+ self . print_sym (
180+ & mut text,
181+ obj,
182+ symbol_idx,
183+ symbol_diff,
184+ & state. diff_obj_config ,
185+ rect,
186+ & self . right_highlight ,
187+ result,
188+ true ,
189+ ) ;
190+ max_width = max_width. max ( text. width ( ) ) ;
191+ prev_text = Some ( text) ;
192192
193- // Render margin
194- let mut text = Text :: default ( ) ;
195- let rect = content_chunks[ 3 ] . inner ( Margin :: new ( 1 , 1 ) ) ;
196- self . print_margin ( & mut text, symbol_diff, rect) ;
197- prev_margin_text = Some ( text) ;
198- }
193+ // Render margin
194+ let mut text = Text :: default ( ) ;
195+ let rect = content_chunks[ 3 ] . inner ( Margin :: new ( 1 , 1 ) ) ;
196+ self . print_margin ( & mut text, symbol_diff, rect) ;
197+ prev_margin_text = Some ( text) ;
199198 }
200199
201200 let max_scroll_x =
@@ -561,10 +560,12 @@ impl FunctionDiffUi {
561560 let len = label_text. len ( ) ;
562561 let highlighted =
563562 highlight_kind != HighlightKind :: None && * highlight == highlight_kind;
564- if let Some ( ( cx, cy) ) = result. click_xy {
565- if cx >= sx && cx < sx + len as u16 && cy == sy {
566- new_highlight = Some ( highlight_kind) ;
567- }
563+ if let Some ( ( cx, cy) ) = result. click_xy
564+ && cx >= sx
565+ && cx < sx + len as u16
566+ && cy == sy
567+ {
568+ new_highlight = Some ( highlight_kind) ;
568569 }
569570 let mut style = Style :: new ( ) . fg ( match segment. color {
570571 DiffTextColor :: Normal => Color :: Gray ,
0 commit comments