Skip to content

Commit

Permalink
refactor: teak with bufferline icon spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
RoloEdits committed Dec 31, 2024
1 parent fdc8764 commit f653134
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions helix-term/src/ui/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -650,11 +650,16 @@ impl EditorView {
let config = editor.config();
let icon = config.icons.mime.get(lang);

let text = format!(
" {icon} {}{} ",
fname,
if doc.is_modified() { "[+]" } else { "" }
);
let text = if lang == icon {
format!(" {} {}", fname, if doc.is_modified() { "[+] " } else { "" })
} else {
format!(
" {icon} {} {}",
fname,
if doc.is_modified() { "[+] " } else { "" }
)
};

let used_width = viewport.x.saturating_sub(x);
let rem_width = surface.area.width.saturating_sub(used_width);

Expand Down

0 comments on commit f653134

Please sign in to comment.