@@ -170,32 +170,31 @@ impl UiView for FunctionDiffUi {
170
170
171
171
let mut prev_text = None ;
172
172
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) ) =
175
175
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) ;
192
192
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) ;
199
198
}
200
199
201
200
let max_scroll_x =
@@ -561,10 +560,12 @@ impl FunctionDiffUi {
561
560
let len = label_text. len ( ) ;
562
561
let highlighted =
563
562
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) ;
568
569
}
569
570
let mut style = Style :: new ( ) . fg ( match segment. color {
570
571
DiffTextColor :: Normal => Color :: Gray ,
0 commit comments