task: use full task label to distinguish a terminal (#10469)

Spotted by @SomeoneToIgnore, in #10468 I've used a shortened task label,
which might lead to collisions.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz
2024-04-12 13:25:46 +02:00
committed by GitHub
parent 298e9c9387
commit a1cbc23fee
5 changed files with 12 additions and 5 deletions
+3 -1
View File
@@ -288,6 +288,7 @@ impl Display for TerminalError {
pub struct SpawnTask {
pub id: TaskId,
pub full_label: String,
pub label: String,
pub command: String,
pub args: Vec<String>,
@@ -594,6 +595,7 @@ pub struct Terminal {
pub struct TaskState {
pub id: TaskId,
pub full_label: String,
pub label: String,
pub status: TaskStatus,
pub completion_rx: Receiver<()>,
@@ -1363,7 +1365,7 @@ impl Terminal {
if truncate {
truncate_and_trailoff(&task_state.label, MAX_CHARS)
} else {
task_state.label.clone()
task_state.full_label.clone()
}
}
None => self