@@ -1411,7 +1411,7 @@ fn select_all(cx: &mut Context) {
1412fn select_regex(cx: &mut Context) {
1412fn select_regex(cx: &mut Context) {
1413 let reg = cx.register.unwrap_or('/');
1413 let reg = cx.register.unwrap_or('/');
1414− let prompt = ui::regex_prompt(
1414+ ui::regex_prompt(
1416 "select:".into(),
1416 "select:".into(),
1417 Some(reg),
1417 Some(reg),
@@ -1428,13 +1428,11 @@ fn select_regex(cx: &mut Context) {
1432− cx.push_layer(Box::new(prompt));
1435fn split_selection(cx: &mut Context) {
1433fn split_selection(cx: &mut Context) {
1436 let reg = cx.register.unwrap_or('/');
1434 let reg = cx.register.unwrap_or('/');
1437− let prompt = ui::regex_prompt(
1435+ ui::regex_prompt(
1439 "split:".into(),
1437 "split:".into(),
1440 Some(reg),
1438 Some(reg),
@@ -1448,8 +1446,6 @@ fn split_selection(cx: &mut Context) {
1448 doc.set_selection(view.id, selection);
1446 doc.set_selection(view.id, selection);
1452− cx.push_layer(Box::new(prompt));
1455fn split_selection_on_newline(cx: &mut Context) {
1451fn split_selection_on_newline(cx: &mut Context) {
@@ -1578,7 +1574,7 @@ fn searcher(cx: &mut Context, direction: Direction) {
1578 let contents = doc.text().slice(..).to_string();
1574 let contents = doc.text().slice(..).to_string();
1579 let completions = search_completions(cx, Some(reg));
1575 let completions = search_completions(cx, Some(reg));
1581− let prompt = ui::regex_prompt(
1577+ ui::regex_prompt(
1583 "search:".into(),
1579 "search:".into(),
1584 Some(reg),
1580 Some(reg),
@@ -1605,8 +1601,6 @@ fn searcher(cx: &mut Context, direction: Direction) {
1609− cx.push_layer(Box::new(prompt));
1612fn search_next_or_prev_impl(cx: &mut Context, movement: Movement, direction: Direction) {
1606fn search_next_or_prev_impl(cx: &mut Context, movement: Movement, direction: Direction) {
@@ -1682,7 +1676,7 @@ fn global_search(cx: &mut Context) {
1682 let file_picker_config = config.file_picker.clone();
1676 let file_picker_config = config.file_picker.clone();
1684 let completions = search_completions(cx, None);
1678 let completions = search_completions(cx, None);
1685− let prompt = ui::regex_prompt(
1679+ ui::regex_prompt(
1687 "global-search:".into(),
1681 "global-search:".into(),
@@ -1764,8 +1758,6 @@ fn global_search(cx: &mut Context) {
1767− cx.push_layer(Box::new(prompt));
1769 let current_path = doc_mut!(cx.editor).path().cloned();
1761 let current_path = doc_mut!(cx.editor).path().cloned();
1771 let show_picker = async move {
1763 let show_picker = async move {
@@ -3400,7 +3392,7 @@ fn join_selections(cx: &mut Context) {
3400fn keep_or_remove_selections_impl(cx: &mut Context, remove: bool) {
3392fn keep_or_remove_selections_impl(cx: &mut Context, remove: bool) {
3401 // keep or remove selections matching regex
3393 // keep or remove selections matching regex
3402 let reg = cx.register.unwrap_or('/');
3394 let reg = cx.register.unwrap_or('/');
3403− let prompt = ui::regex_prompt(
3395+ ui::regex_prompt(
3405 if remove { "remove:" } else { "keep:" }.into(),
3397 if remove { "remove:" } else { "keep:" }.into(),
3406 Some(reg),
3398 Some(reg),
@@ -3417,9 +3409,7 @@ fn keep_or_remove_selections_impl(cx: &mut Context, remove: bool) {
3417 doc.set_selection(view.id, selection);
3409 doc.set_selection(view.id, selection);
3422− cx.push_layer(Box::new(prompt));
3425fn keep_selections(cx: &mut Context) {
3415fn keep_selections(cx: &mut Context) {