@@ -548,21 +548,6 @@ impl EditorView {
549 surface.set_string(viewport.x + 5, viewport.y, progress, base_style);
549 surface.set_string(viewport.x + 5, viewport.y, progress, base_style);
551− let rel_path = doc.relative_path();
554− .map(|p| p.to_string_lossy())
555− .unwrap_or_else(|| SCRATCH_BUFFER_NAME.into());
557− let title = format!("{}{}", path, if doc.is_modified() { "[+]" } else { "" });
558− surface.set_stringn(
562− viewport.width.saturating_sub(6) as usize,
566 //-------------------------------
551 //-------------------------------
567 // Right side of the status line.
552 // Right side of the status line.
568 //-------------------------------
553 //-------------------------------
@@ -646,6 +631,31 @@ impl EditorView {
646 &right_side_text,
631 &right_side_text,
647 right_side_text.width() as u16,
632 right_side_text.width() as u16,
635+ //-------------------------------
636+ // Middle / File path / Title
637+ //-------------------------------
639+ let rel_path = doc.relative_path();
642+ .map(|p| p.to_string_lossy())
643+ .unwrap_or_else(|| SCRATCH_BUFFER_NAME.into());
644+ format!("{}{}", path, if doc.is_modified() { "[+]" } else { "" })
647+ surface.set_string_truncated(
648+ viewport.x + 8, // 8: 1 space + 3 char mode string + 1 space + 1 spinner + 1 space
654+ .saturating_sub(right_side_text.width() as u16 + 1) as usize, // "+ 1": a space between the title and the selection info
651 /// Handle events by looking them up in `self.keymaps`. Returns None
661 /// Handle events by looking them up in `self.keymaps`. Returns None