fix: terminal title (#4352)
This commit is contained in:
parent
6848c8b136
commit
1b547b228a
1 changed files with 11 additions and 11 deletions
|
|
@ -67,17 +67,17 @@ pub fn adjust_to_size(s: &str, rows: usize, columns: usize) -> String {
|
|||
}
|
||||
|
||||
pub fn make_terminal_title(pane_title: &str) -> String {
|
||||
// if we receive a title, we display it, otherwise we display the session name
|
||||
if pane_title.is_empty() {
|
||||
format!(
|
||||
"\u{1b}]0;Zellij {}\u{07}",
|
||||
"\u{1b}]0;{}{}\u{07}",
|
||||
get_session_name()
|
||||
.map(|n| format!("({}) ", n))
|
||||
.unwrap_or_default()
|
||||
)
|
||||
.map(|n| if pane_title.is_empty() {
|
||||
format!("{}", n)
|
||||
} else {
|
||||
format!("\u{1b}]0;{}\u{07}", pane_title,)
|
||||
}
|
||||
format!("{} | ", n)
|
||||
})
|
||||
.unwrap_or_default(),
|
||||
pane_title
|
||||
)
|
||||
}
|
||||
|
||||
// Colors
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue