File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -263,6 +263,8 @@ fn run_app<B: Backend>(terminal: &mut Terminal<B>, mut app: App) -> io::Result<(
263263 InputMode :: PopupEdit => {
264264 match key. code {
265265 KeyCode :: Char ( 'q' ) => app. input_mode = InputMode :: Popup ,
266+ // here todo
267+ KeyCode :: Char ( 'e' ) => todo ! ( ) ,
266268 _ => { }
267269 }
268270 }
@@ -331,19 +333,16 @@ fn ui<B: Backend>(f: &mut Frame<B>, app: &mut App) {
331333 } )
332334 . block ( Block :: default ( ) . borders ( Borders :: ALL ) . title ( "Input" ) ) ;
333335 f. render_widget ( input, chunks[ 1 ] ) ;
334- match app. input_mode {
335- InputMode :: Editing => {
336+ if let InputMode :: Editing = app. input_mode {
336337 // Make the cursor visible and ask tui-rs to put it at the specified coordinates after rendering
337338 f. set_cursor (
338339 // Put cursor past the end of the input text
339340 chunks[ 1 ] . x + app. input . width ( ) as u16 + 1 ,
340341 // Move one line down, from the border to the input line
341342 chunks[ 1 ] . y + 1 ,
342343 )
343- }
344344 //InputMode::Normal | InputMode::Select | InputMode::Popup =>
345345 // Hide the cursor. `Frame` does this by default, so we don't need to do anything here
346- _ => { }
347346 }
348347
349348 // Bottom two inner blocks
You can’t perform that action at this time.
0 commit comments