|
|
@ -5616,7 +5616,6 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
|
|
|
|
("a", "Argument/parameter (tree-sitter)"),
|
|
|
|
("a", "Argument/parameter (tree-sitter)"),
|
|
|
|
("c", "Comment (tree-sitter)"),
|
|
|
|
("c", "Comment (tree-sitter)"),
|
|
|
|
("T", "Test (tree-sitter)"),
|
|
|
|
("T", "Test (tree-sitter)"),
|
|
|
|
("x", "Tag (XML/HTML/JSX)"),
|
|
|
|
|
|
|
|
("e", "Data structure entry (tree-sitter)"),
|
|
|
|
("e", "Data structure entry (tree-sitter)"),
|
|
|
|
("m", "Closest surrounding pair (tree-sitter)"),
|
|
|
|
("m", "Closest surrounding pair (tree-sitter)"),
|
|
|
|
("g", "Change"),
|
|
|
|
("g", "Change"),
|
|
|
@ -5626,24 +5625,6 @@ fn select_textobject(cx: &mut Context, objtype: textobject::TextObject) {
|
|
|
|
cx.editor.autoinfo = Some(Info::new(title, &help_text));
|
|
|
|
cx.editor.autoinfo = Some(Info::new(title, &help_text));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// fn create_surround_prompt(
|
|
|
|
|
|
|
|
// editor: &Editor,
|
|
|
|
|
|
|
|
// prefill: String,
|
|
|
|
|
|
|
|
// history_register: Option<char>,
|
|
|
|
|
|
|
|
// callback_fn: impl FnMut(&mut compositor::Context<'_>, &str, PromptEvent) + 'static,
|
|
|
|
|
|
|
|
// ) -> Box<Prompt> {
|
|
|
|
|
|
|
|
// let prompt = Prompt::new(
|
|
|
|
|
|
|
|
// "tag name:".into(),
|
|
|
|
|
|
|
|
// // TODO: change this to actually be history_register
|
|
|
|
|
|
|
|
// Some('z'),
|
|
|
|
|
|
|
|
// ui::completers::none,
|
|
|
|
|
|
|
|
// callback_fn,
|
|
|
|
|
|
|
|
// )
|
|
|
|
|
|
|
|
// .with_line("temp".into(), editor);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Box::new(prompt)
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn surround_add_impl(
|
|
|
|
fn surround_add_impl(
|
|
|
|
doc: &mut Document,
|
|
|
|
doc: &mut Document,
|
|
|
|
view: &mut View,
|
|
|
|
view: &mut View,
|
|
|
@ -5701,7 +5682,6 @@ fn surround_add(cx: &mut Context) {
|
|
|
|
context.editor.mode = Mode::Normal;
|
|
|
|
context.editor.mode = Mode::Normal;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
// .with_line(String::from("temp"), cx.editor);
|
|
|
|
|
|
|
|
cx.push_layer(Box::new(prompt));
|
|
|
|
cx.push_layer(Box::new(prompt));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
let (open, close) = match_brackets::get_pair(ch);
|
|
|
|
let (open, close) = match_brackets::get_pair(ch);
|
|
|
|