File tree 2 files changed +15
-1
lines changed
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
- add ` trace-libgit ` feature to make git tracing optional [[ @dm9pZCAq ] ( https://github.com/dm9pZCAq )] ([ #902 ] ( https://github.com/extrawurst/gitui/issues/902 ) )
12
12
- support merging and rebasing remote branches ([ #920 ] ( https://github.com/extrawurst/gitui/issues/920 ) )
13
13
- add highlighting matches in fuzzy finder ([ #893 ] ( https://github.com/extrawurst/gitui/issues/893 ) )
14
+ - support ` home ` and ` end ` keys in branchlist ([ #957 ] ( https://github.com/extrawurst/gitui/issues/957 ) )
14
15
15
16
## [ 0.18] - 2021-10-11
16
17
Original file line number Diff line number Diff line change @@ -226,6 +226,14 @@ impl Component for BranchListComponent {
226
226
return self
227
227
. move_selection ( ScrollType :: PageUp )
228
228
. map ( Into :: into) ;
229
+ } else if e == self . key_config . home {
230
+ return self
231
+ . move_selection ( ScrollType :: Home )
232
+ . map ( Into :: into) ;
233
+ } else if e == self . key_config . end {
234
+ return self
235
+ . move_selection ( ScrollType :: End )
236
+ . map ( Into :: into) ;
229
237
} else if e == self . key_config . tab_toggle {
230
238
self . local = !self . local ;
231
239
self . update_branches ( ) ?;
@@ -447,7 +455,12 @@ impl BranchListComponent {
447
455
ScrollType :: PageUp => self
448
456
. selection
449
457
. saturating_sub ( self . current_height . get ( ) ) ,
450
- _ => self . selection ,
458
+ ScrollType :: Home => 0 ,
459
+ ScrollType :: End => {
460
+ let num_branches: u16 =
461
+ self . branches . len ( ) . try_into ( ) ?;
462
+ num_branches. saturating_sub ( 1 )
463
+ }
451
464
} ;
452
465
453
466
self . set_selection ( new_selection) ?;
You can’t perform that action at this time.
0 commit comments