Aleksei Gusev
11545c669e
Add file icons to multibuffer view ( #36836 )
...
<img width="1988" height="1420" alt="multi-buffer-icons-git-diff"
src="https://github.com/user-attachments/assets/48f9722f-ca09-4aa7-ad7a-0b7e85f440d9 "
/>
Unfortunately, `cargo format` decided to reformat everything. Probably,
because of hitting the right margin, no idea. The essence of this change
is the following:
```rust
.map(|path_header| {
let filename = filename
.map(SharedString::from)
.unwrap_or_else(|| "untitled".into());
let path = path::Path::new(filename.as_str());
let icon =
FileIcons::get_icon(path, cx).unwrap_or_default();
let icon = Icon::from_path(icon).color(Color::Muted);
let label = Label::new(filename).single_line().when_some(
file_status,
|el, status| {
el.color(if status.is_conflicted() {
Color::Conflict
} else if status.is_modified() {
Color::Modified
} else if status.is_deleted() {
Color::Disabled
} else {
Color::Created
})
.when(status.is_deleted(), |el| el.strikethrough())
},
);
path_header.child(icon).child(label)
})
```
Release Notes:
- Added file icons to multi buffer view
2025-08-24 18:57:12 +02:00
..
2025-08-24 11:05:39 +00:00
2025-08-23 14:30:54 +00:00
2025-08-20 14:07:37 +02:00
2025-08-20 14:07:37 +02:00
2025-08-23 01:21:20 -04:00
2025-08-24 16:30:34 +00:00
2025-08-23 14:30:54 +00:00
2025-08-20 12:05:58 +02:00
2025-08-24 11:05:39 +00:00
2025-08-22 11:45:47 -04:00
2025-08-05 18:16:47 +00:00
2025-08-19 21:26:17 +02:00
2025-08-13 13:25:52 -06:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:05:58 +02:00
2025-08-20 12:20:13 +02:00
2025-08-19 20:33:44 +00:00
2025-08-20 14:35:59 +00:00
2025-08-21 15:56:16 +02:00
2025-08-19 14:20:01 +00:00
2025-08-20 12:05:58 +02:00
2025-08-20 12:20:13 +02:00
2025-07-22 11:55:24 -04:00
2025-08-19 21:26:17 +02:00
2025-08-19 13:27:24 +00:00
2025-08-22 03:48:47 -04:00
2025-08-19 21:26:17 +02:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:20:13 +02:00
2025-08-22 22:17:02 +00:00
2025-08-22 11:45:47 -04:00
2025-08-07 01:28:41 +00:00
2025-08-11 15:34:34 +02:00
2025-08-22 23:28:55 +02:00
2025-08-21 18:50:06 +00:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:20:13 +02:00
2025-08-22 13:16:42 +00:00
2025-08-22 13:58:17 +00:00
2025-08-21 19:59:42 -04:00
2025-08-19 21:26:17 +02:00
2025-08-20 12:05:58 +02:00
2025-08-19 20:33:44 +00:00
2025-08-19 20:26:56 -06:00
2025-07-06 14:52:16 +02:00
2025-08-20 12:20:13 +02:00
2025-08-21 19:08:26 +02:00
2025-06-25 09:42:30 +02:00
2025-08-23 07:03:36 +00:00
2025-08-20 23:41:06 +00:00
2025-08-22 11:45:47 -04:00
2025-08-22 11:45:47 -04:00
2025-08-24 18:57:12 +02:00
2025-08-20 20:14:30 +02:00
2025-07-10 21:08:43 +02:00
2025-08-19 20:33:44 +00:00
2025-08-20 12:05:58 +02:00
2025-08-16 19:00:31 +00:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:20:13 +02:00
2025-08-20 02:11:17 +00:00
2025-08-21 19:59:42 -04:00
2025-08-20 15:17:28 +02:00
2025-08-19 21:26:17 +02:00
2025-08-20 12:20:13 +02:00
2025-08-19 13:27:24 +00:00
2025-08-06 10:53:20 +02:00
2025-08-20 20:14:30 +02:00
2025-08-19 13:27:24 +00:00
2025-08-22 01:12:12 -04:00
2025-08-20 14:07:37 +02:00
2025-08-19 21:26:17 +02:00
2025-08-21 19:59:42 -04:00
2025-08-20 18:45:40 +00:00
2025-08-21 17:19:57 +00:00
2025-08-19 13:27:24 +00:00
2025-08-20 12:20:13 +02:00
2025-08-22 09:52:44 -03:00
2025-06-03 13:18:29 +02:00
2025-08-24 11:01:42 +00:00
2025-08-18 21:54:35 +00:00
2025-08-19 20:33:44 +00:00
2025-06-18 16:01:28 +05:30
2025-08-20 12:20:13 +02:00
2025-08-22 13:58:17 +00:00
2025-08-18 21:54:35 +00:00
2025-08-23 14:30:54 +00:00
2025-08-23 14:30:54 +00:00
2025-08-19 13:27:24 +00:00
2025-08-20 12:20:13 +02:00
2025-08-24 09:54:47 +03:00
2025-08-21 15:56:16 +02:00
2025-07-25 09:36:43 -04:00
2025-08-21 09:24:34 +03:00
2025-08-21 20:51:36 -03:00
2025-08-20 12:20:13 +02:00
2025-07-02 21:14:33 -04:00
2025-08-20 12:20:13 +02:00
2025-08-09 15:25:47 -04:00
2025-08-24 09:59:32 +03:00
2025-07-17 14:25:55 +00:00
2025-07-08 14:34:57 +00:00
2025-08-19 20:33:44 +00:00
2025-08-19 13:27:24 +00:00
2025-08-06 10:44:15 -04:00
2025-08-22 11:51:01 -04:00
2025-08-19 21:26:17 +02:00
2025-08-19 21:26:17 +02:00
2025-06-27 14:31:31 -06:00
2025-08-21 09:24:34 -04:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:05:58 +02:00
2025-08-20 12:20:13 +02:00
2025-08-19 21:26:17 +02:00
2025-08-23 20:30:16 +05:30
2025-08-22 17:04:39 +00:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:20:13 +02:00
2025-08-22 22:55:50 +00:00
2025-08-22 14:10:45 -07:00
2025-08-19 13:27:24 +00:00
2025-08-22 15:44:58 -07:00
2025-08-21 09:37:45 +00:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:05:58 +02:00
2025-08-19 13:27:24 +00:00
2025-08-20 12:20:13 +02:00
2025-08-21 06:48:04 +00:00
2025-08-20 12:20:13 +02:00
2025-08-22 23:28:55 +02:00
2025-08-20 12:20:13 +02:00
2025-08-19 13:27:24 +00:00
2025-08-21 15:56:16 +02:00
2025-08-20 12:20:13 +02:00
2025-08-22 00:18:25 +00:00
2025-08-19 21:26:17 +02:00
2025-08-19 21:26:17 +02:00
2025-08-19 13:27:24 +00:00
2025-08-19 13:27:24 +00:00
2025-08-20 12:20:13 +02:00
2025-08-19 20:33:44 +00:00
2025-08-18 21:54:35 +00:00
2025-08-19 21:26:17 +02:00
2025-08-20 12:20:13 +02:00
2025-08-19 21:26:17 +02:00
2025-08-19 20:33:44 +00:00
2025-08-21 19:59:42 -04:00
2025-08-22 00:21:36 +02:00
2025-08-21 19:08:26 +02:00
2025-08-20 14:35:59 +00:00
2025-08-19 21:26:17 +02:00
2025-08-15 15:37:52 -04:00
2025-08-20 12:20:13 +02:00
2025-08-22 10:17:37 +05:30
2025-08-19 21:26:17 +02:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:20:13 +02:00
2025-08-08 15:34:36 -03:00
2025-08-20 14:07:37 +02:00
2025-08-21 09:37:45 +00:00
2025-08-22 20:40:52 +00:00
2025-08-20 12:20:13 +02:00
2025-07-30 23:03:53 +05:30
2025-08-21 19:08:26 +02:00
2025-06-13 06:32:29 +00:00
2025-08-15 13:54:24 +03:00
2025-08-21 21:20:22 -06:00
2025-06-18 21:26:12 +00:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:20:13 +02:00
2025-08-19 20:33:44 +00:00
2025-08-22 15:44:58 -07:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:05:58 +02:00
2025-08-22 14:10:45 -07:00
2025-08-22 17:04:39 +00:00
2025-08-22 11:45:47 -04:00
2025-08-20 12:20:13 +02:00
2025-08-20 12:20:13 +02:00