File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -154,20 +154,24 @@ impl App<'_> {
154154 self . numeric_prefix . clear ( ) ;
155155 }
156156 None => {
157- if let KeyCode :: Char ( c) = key. code {
157+ if let StatusLine :: Input ( _, _, _) = self . status_line {
158+ // In input mode, pass all key events to the view
159+ // fixme: currently, the only thing that processes key_event is searching the list,
160+ // so this probably works, but it's not the right process...
161+ self . numeric_prefix . clear ( ) ;
162+ self . view . handle_event (
163+ UserEventWithCount :: from_event ( UserEvent :: Unknown ) ,
164+ key,
165+ ) ;
166+ } else if let KeyCode :: Char ( c) = key. code {
167+ // Accumulate numeric prefix
158168 if c. is_ascii_digit ( )
159169 && ( c != '0' || !self . numeric_prefix . is_empty ( ) )
160170 {
161171 self . numeric_prefix . push ( c) ;
162172 continue ;
163173 }
164174 }
165-
166- self . numeric_prefix . clear ( ) ;
167- self . view . handle_event (
168- UserEventWithCount :: from_event ( UserEvent :: Unknown ) ,
169- key,
170- ) ;
171175 }
172176 }
173177 }
You can’t perform that action at this time.
0 commit comments