aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/prompt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/prompt.rs')
-rw-r--r--helix-term/src/prompt.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/helix-term/src/prompt.rs b/helix-term/src/prompt.rs
index 4747c9f5..7f473ebc 100644
--- a/helix-term/src/prompt.rs
+++ b/helix-term/src/prompt.rs
@@ -1,5 +1,6 @@
use crate::compositor::{Component, Context, EventResult};
use crossterm::event::{Event, KeyCode, KeyEvent, KeyModifiers};
+use helix_core::Position;
use helix_view::Editor;
use helix_view::Theme;
use std::string::String;
@@ -200,4 +201,11 @@ impl Component for Prompt {
fn render(&self, area: Rect, surface: &mut Surface, cx: &mut Context) {
self.render_prompt(area, surface, &cx.editor.theme)
}
+
+ fn cursor_position(&self, area: Rect, ctx: &mut Context) -> Option<Position> {
+ Some(Position::new(
+ area.height as usize - 1,
+ area.x as usize + 2 + self.cursor,
+ ))
+ }
}