task: Always use untruncated label if it is short (#23611)

Also changed rust tasks to be less mouthful.

Release Notes:

- Shortened Rust task labels.
- Task modal will now use full task label when it does not require
truncation.
This commit is contained in:
Piotr Osiewicz 2025-01-24 17:46:48 +01:00 committed by GitHub
parent 7c2b17540b
commit 77e9d01b39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31 additions and 22 deletions

View file

@ -791,7 +791,7 @@ mod tests {
assert_eq!(
task_names(&tasks_picker, cx),
vec![
"hello from h.odd_extension:1:1".to_string(),
"hello from /dir/file_with.odd_extension:1:1".to_string(),
"opened now: /dir".to_string()
],
"Second opened buffer should fill the context, labels should be trimmed if long enough"
@ -820,7 +820,7 @@ mod tests {
assert_eq!(
task_names(&tasks_picker, cx),
vec![
"hello from thout_extension:2:3".to_string(),
"hello from /dir/file_without_extension:2:3".to_string(),
"opened now: /dir".to_string()
],
"Opened buffer should fill the context, labels should be trimmed if long enough"