Coalesce consecutive spaces in new buffer tab titles (#32363)
VS Code has a behavior where it coalesces consecutive spaces in new buffer tab titles, which I quite like. This presents the content better and allows more meaningful content to be displayed, as consecutive spaces don't count towards the 40 character limit. VS Code <img width="1013" alt="SCR-20250608-uelt" src="https://github.com/user-attachments/assets/71a1fd4b-a506-4eab-b6a4-66096a12f1ad" /> Zed <img width="1136" alt="SCR-20250608-ueif" src="https://github.com/user-attachments/assets/f40fc3c9-0f0f-471d-93ed-be9568fbe778" /> Release Notes: - N/A
This commit is contained in:
parent
4fe05530b0
commit
ebea734515
3 changed files with 63 additions and 22 deletions
|
@ -18858,7 +18858,7 @@ impl Editor {
|
|||
cx.emit(EditorEvent::BufferEdited);
|
||||
cx.emit(SearchEvent::MatchesInvalidated);
|
||||
if *singleton_buffer_edited {
|
||||
if let Some(buffer) = multibuffer.read(cx).as_singleton() {
|
||||
if let Some(buffer) = edited_buffer {
|
||||
if buffer.read(cx).file().is_none() {
|
||||
cx.emit(EditorEvent::TitleChanged);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue