Small improvements of the task terminal spawn behavior (#9399)
* Add a `reveal: always|never` field in task definitions from tasks.json , allowing to customize task terminal behavior on spawn * Ensure reveal: always reveals the terminal even if the old task is already running Release Notes: - Added a `reveal: always|never` (`always` is a default) field in task definitions from tasks.json , allowing to customize task terminal behavior on spawn --------- Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
This commit is contained in:
parent
276139f792
commit
dcdd1ece1c
6 changed files with 79 additions and 19 deletions
|
@ -6,6 +6,7 @@ pub mod static_source;
|
|||
|
||||
use collections::HashMap;
|
||||
use gpui::ModelContext;
|
||||
use static_source::RevealStrategy;
|
||||
use std::any::Any;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::Arc;
|
||||
|
@ -34,6 +35,8 @@ pub struct SpawnInTerminal {
|
|||
pub use_new_terminal: bool,
|
||||
/// Whether to allow multiple instances of the same task to be run, or rather wait for the existing ones to finish.
|
||||
pub allow_concurrent_runs: bool,
|
||||
/// What to do with the terminal pane and tab, after the command was started.
|
||||
pub reveal: RevealStrategy,
|
||||
}
|
||||
|
||||
/// Keeps track of the file associated with a task and context of tasks execution (i.e. current file or current function)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue