File tree Expand file tree Collapse file tree
crates/loom-tui/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -77,6 +77,30 @@ impl SearchDialog {
7777 }
7878 Action :: None
7979 }
80+ KeyCode :: PageUp => {
81+ let i = self . table_state . selected ( ) . unwrap_or ( 0 ) ;
82+ self . table_state . select ( Some ( i. saturating_sub ( 10 ) ) ) ;
83+ Action :: None
84+ }
85+ KeyCode :: PageDown => {
86+ let i = self . table_state . selected ( ) . unwrap_or ( 0 ) ;
87+ let max = self . results . len ( ) . saturating_sub ( 1 ) ;
88+ self . table_state . select ( Some ( ( i + 10 ) . min ( max) ) ) ;
89+ Action :: None
90+ }
91+ KeyCode :: Home => {
92+ if !self . results . is_empty ( ) {
93+ self . table_state . select ( Some ( 0 ) ) ;
94+ }
95+ Action :: None
96+ }
97+ KeyCode :: End => {
98+ if !self . results . is_empty ( ) {
99+ self . table_state
100+ . select ( Some ( self . results . len ( ) . saturating_sub ( 1 ) ) ) ;
101+ }
102+ Action :: None
103+ }
80104 KeyCode :: Enter => {
81105 if let Some ( idx) = self . table_state . selected ( ) {
82106 if let Some ( entry) = self . results . get ( idx) {
You can’t perform that action at this time.
0 commit comments