@@ -684,17 +684,19 @@ impl<T: Item + 'static> FilePicker<T> {
684684 EventResult::Consumed(None)
685685 }
686686
687− fn cursor(&self, area: Rect, ctx: &Editor) -> (Option<Position>, CursorKind) {
688− self.picker.cursor(area, ctx)
687+ fn cursor(&self, area: Rect, editor: &Editor) -> (Option<Position>, CursorKind) {
688+ let block = Block::default().borders(Borders::ALL);
689+ // calculate the inner area inside the box
690+ let inner = block.inner(area);
691+
692+ // prompt area
693+ let area = inner.clip_left(1).with_height(1);
694+
695+ self.prompt.cursor(area, editor)
689696 }
690697
691698 fn required_size(&mut self, (width, height): (u16, u16)) -> Option<(u16, u16)> {
692− let picker_width = if width > MIN_AREA_WIDTH_FOR_PREVIEW {
693− width / 2
694− } else {
695− width
696− };
697− self.picker.required_size((picker_width, height))?;
699+ self.completion_height = height.saturating_sub(4);
698700 Some((width, height))
699701 }
700702
@@ -826,8 +828,7 @@ impl<T: Item> Picker<T> {
826828
827829impl<T: Item + 'static> Component for Picker<T> {
828830 fn required_size(&mut self, viewport: (u16, u16)) -> Option<(u16, u16)> {
829− self.completion_height = viewport.1.saturating_sub(4);
830− Some(viewport)
831+ unimplemented!()
831832 }
832833
833834 fn handle_event(&mut self, event: &Event, cx: &mut Context) -> EventResult {
@@ -1001,14 +1002,7 @@ impl<T: Item + 'static> Component for Picker<T> {
10011002 }
10021003
10031004 fn cursor(&self, area: Rect, editor: &Editor) -> (Option<Position>, CursorKind) {
1004− let block = Block::default().borders(Borders::ALL);
1005− // calculate the inner area inside the box
1006− let inner = block.inner(area);
1007−
1008− // prompt area
1009− let area = inner.clip_left(1).with_height(1);
1010−
1011− self.prompt.cursor(area, editor)
1005+ unimplemented!()
10121006 }
10131007}
10141008