mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-26 11:23:31 +04:00
Add Copy
derive to PromptEvent
This commit is contained in:
parent
b500a2a138
commit
d8b5d1181f
@ -1024,12 +1024,12 @@ fn later(editor: &mut Editor, args: &[&str], event: PromptEvent) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn write_quit(editor: &mut Editor, args: &[&str], event: PromptEvent) {
|
fn write_quit(editor: &mut Editor, args: &[&str], event: PromptEvent) {
|
||||||
write(editor, args, event.clone());
|
write(editor, args, event);
|
||||||
quit(editor, &[], event);
|
quit(editor, &[], event);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn force_write_quit(editor: &mut Editor, args: &[&str], event: PromptEvent) {
|
fn force_write_quit(editor: &mut Editor, args: &[&str], event: PromptEvent) {
|
||||||
write(editor, args, event.clone());
|
write(editor, args, event);
|
||||||
force_quit(editor, &[], event);
|
force_quit(editor, &[], event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ pub struct Prompt {
|
|||||||
pub doc_fn: Box<dyn Fn(&str) -> Option<&'static str>>,
|
pub doc_fn: Box<dyn Fn(&str) -> Option<&'static str>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, PartialEq)]
|
#[derive(Clone, Copy, PartialEq)]
|
||||||
pub enum PromptEvent {
|
pub enum PromptEvent {
|
||||||
/// The prompt input has been updated.
|
/// The prompt input has been updated.
|
||||||
Update,
|
Update,
|
||||||
|
Loading…
Reference in New Issue
Block a user