Run slash commands both on enter and on argument completion that requires it (#16283)
Release Notes: - N/A
This commit is contained in:
parent
5a30e29848
commit
c45adce2e3
9 changed files with 61 additions and 34 deletions
|
@ -42,6 +42,9 @@ pub trait SlashCommand: 'static + Send + Sync {
|
|||
cx: &mut WindowContext,
|
||||
) -> Task<Result<Vec<ArgumentCompletion>>>;
|
||||
fn requires_argument(&self) -> bool;
|
||||
fn accepts_arguments(&self) -> bool {
|
||||
self.requires_argument()
|
||||
}
|
||||
fn run(
|
||||
self: Arc<Self>,
|
||||
arguments: &[String],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue