|
|
|
@ -217,6 +217,7 @@ impl Command {
|
|
|
|
|
file_picker,
|
|
|
|
|
buffer_picker,
|
|
|
|
|
symbol_picker,
|
|
|
|
|
last_picker,
|
|
|
|
|
prepend_to_line,
|
|
|
|
|
append_to_line,
|
|
|
|
|
open_below,
|
|
|
|
@ -2091,6 +2092,17 @@ fn symbol_picker(cx: &mut Context) {
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn last_picker(cx: &mut Context) {
|
|
|
|
|
// TODO: last picker does not seemed to work well with buffer_picker
|
|
|
|
|
cx.callback = Some(Box::new(|compositor: &mut Compositor| {
|
|
|
|
|
if let Some(picker) = compositor.last_picker.take() {
|
|
|
|
|
compositor.push(picker);
|
|
|
|
|
}
|
|
|
|
|
// XXX: figure out how to show error when no last picker lifetime
|
|
|
|
|
// cx.editor.set_error("no last picker".to_owned())
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// I inserts at the first nonwhitespace character of each line with a selection
|
|
|
|
|
fn prepend_to_line(cx: &mut Context) {
|
|
|
|
|
goto_first_nonwhitespace(cx);
|
|
|
|
@ -3749,6 +3761,8 @@ macro_rules! mode_info {
|
|
|
|
|
mode_info! {
|
|
|
|
|
/// space mode
|
|
|
|
|
space_mode, SPACE_MODE,
|
|
|
|
|
/// resume last picker
|
|
|
|
|
"'" => last_picker,
|
|
|
|
|
/// file picker
|
|
|
|
|
"f" => file_picker,
|
|
|
|
|
/// buffer picker
|
|
|
|
|