@@ -35,6 +35,7 @@ pub fn regex_prompt(
3535 let (view, doc) = current!(cx.editor);
3636 let view_id = view.id;
3737 let snapshot = doc.selection(view_id).clone();
38+ let offset_snapshot = view.offset;
3839
3940 Prompt::new(
4041 prompt,
@@ -45,6 +46,7 @@ pub fn regex_prompt(
4546 PromptEvent::Abort => {
4647 let (view, doc) = current!(cx.editor);
4748 doc.set_selection(view.id, snapshot.clone());
49+ view.offset = offset_snapshot;
4850 }
4951 PromptEvent::Validate => {
5052 // TODO: push_jump to store selection just before jump