aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-04-14 06:21:49 +0000
committerBlaž Hrastnik2021-04-14 06:39:31 +0000
commit811f952a41177242f7dfa4d66f2b16157f918718 (patch)
tree55ea44e4c416ccf82d25f5e01534ea84969fdd05 /helix-term/src/ui
parent9e6c8c2a5a8b2a48543ee856fa801b2f30f113e1 (diff)
Center search results.
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs
index 57c08ddf..d9a05a9c 100644
--- a/helix-term/src/ui/mod.rs
+++ b/helix-term/src/ui/mod.rs
@@ -20,7 +20,7 @@ pub use tui::layout::Rect;
pub use tui::style::{Color, Modifier, Style};
use helix_core::regex::Regex;
-use helix_view::{Document, Editor};
+use helix_view::{View, Document, Editor};
use std::path::{Path, PathBuf};
@@ -33,7 +33,7 @@ pub fn text_color() -> Style {
pub fn regex_prompt(
cx: &mut crate::commands::Context,
prompt: String,
- fun: impl Fn(&mut Document, Regex) + 'static,
+ fun: impl Fn(&mut View, &mut Document, Regex) + 'static,
) -> Prompt {
let view_id = cx.view().id;
let snapshot = cx.doc().selection(view_id).clone();
@@ -65,7 +65,7 @@ pub fn regex_prompt(
// TODO: also revert text
doc.set_selection(view.id, snapshot.clone());
- fun(doc, regex);
+ fun(view, doc, regex);
view.ensure_cursor_in_view(doc);
}