aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-02-12 09:10:05 +0000
committerBlaž Hrastnik2021-02-12 09:10:05 +0000
commit83d48f10ea01673c990296c0a5efb5bc201b4972 (patch)
tree27acf920836f3ffad0f73758a916890d7cd994de /helix-term/src/ui
parent6dba0516f235f65c8b0a7d1e8d02d5d3748274c0 (diff)
search: Barebones implementation.
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/mod.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs
index 29483705..e1899144 100644
--- a/helix-term/src/ui/mod.rs
+++ b/helix-term/src/ui/mod.rs
@@ -43,12 +43,15 @@ pub fn regex_prompt(
PromptEvent::Update => {
match Regex::new(input) {
Ok(regex) => {
- let doc = &mut editor.view_mut().doc;
+ let view = &mut editor.view_mut();
+ let doc = &mut view.doc;
// revert state to what it was before the last update
doc.state = snapshot.clone();
fun(doc, regex);
+
+ view.ensure_cursor_in_view();
}
Err(_err) => (), // TODO: mark command line as error
}