@@ -115,6 +115,9 @@ impl Component for BranchListComponent {
115
115
out. clear ( ) ;
116
116
}
117
117
118
+ let selection_is_cur_branch =
119
+ self . selection_is_cur_branch ( ) ;
120
+
118
121
out. push ( CommandInfo :: new (
119
122
strings:: commands:: scroll ( & self . key_config ) ,
120
123
true ,
@@ -139,7 +142,7 @@ impl Component for BranchListComponent {
139
142
strings:: commands:: compare_with_head (
140
143
& self . key_config ,
141
144
) ,
142
- !self . selection_is_cur_branch ( ) ,
145
+ !selection_is_cur_branch,
143
146
true ,
144
147
) ) ;
145
148
@@ -156,8 +159,7 @@ impl Component for BranchListComponent {
156
159
strings:: commands:: select_branch_popup (
157
160
& self . key_config ,
158
161
) ,
159
- !self . selection_is_cur_branch ( )
160
- && self . valid_selection ( ) ,
162
+ !selection_is_cur_branch && self . valid_selection ( ) ,
161
163
true ,
162
164
) ) ;
163
165
@@ -173,23 +175,23 @@ impl Component for BranchListComponent {
173
175
strings:: commands:: delete_branch_popup (
174
176
& self . key_config ,
175
177
) ,
176
- !self . selection_is_cur_branch ( ) ,
178
+ !selection_is_cur_branch,
177
179
true ,
178
180
) ) ;
179
181
180
182
out. push ( CommandInfo :: new (
181
183
strings:: commands:: merge_branch_popup (
182
184
& self . key_config ,
183
185
) ,
184
- !self . selection_is_cur_branch ( ) ,
186
+ !selection_is_cur_branch,
185
187
true ,
186
188
) ) ;
187
189
188
190
out. push ( CommandInfo :: new (
189
191
strings:: commands:: branch_popup_rebase (
190
192
& self . key_config ,
191
193
) ,
192
- !self . selection_is_cur_branch ( ) ,
194
+ !selection_is_cur_branch,
193
195
true ,
194
196
) ) ;
195
197
0 commit comments