@@ -137,9 +137,10 @@ impl Prompt {
137137 }
138138 }
139139 }
140+ let line = area.height - 1;
140141 // render buffer text
141− surface.set_string(1, area.height - 1, &self.prompt, text_color);
142− surface.set_string(2, area.height - 1, &self.line, text_color);
142+ surface.set_string(0, line, &self.prompt, text_color);
143+ surface.set_string(self.prompt.len() as u16, line, &self.line, text_color);
143144 }
144145}
145146
@@ -206,8 +207,8 @@ impl Component for Prompt {
206207
207208 fn cursor_position(&self, area: Rect, ctx: &mut Context) -> Option<Position> {
208209 Some(Position::new(
209− area.height as usize - 1,
210− area.x as usize + 2 + self.cursor,
210+ area.height as usize,
211+ area.x as usize + self.prompt.len() + self.cursor,
211212 ))
212213 }
213214}