diff options
Diffstat (limited to 'helix-term/src/ui/mod.rs')
-rw-r--r-- | helix-term/src/ui/mod.rs | 5 |
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 } |