1
1
mirror of https://github.com/wez/wezterm.git synced 2024-10-27 08:09:45 +03:00

fix width of format-tab-title that returns embedded escapes

closes: #3481
This commit is contained in:
Wez Furlong 2023-04-16 08:28:35 -07:00
parent 8435a12e12
commit 4ba653c716
No known key found for this signature in database
GPG Key ID: 7A7F66A31EC9B387
2 changed files with 4 additions and 1 deletions

View File

@ -37,6 +37,8 @@ As features stabilize some brief notes about them will accumulate here.
window which contained the pane in which the variable was changed. #3524 window which contained the pane in which the variable was changed. #3524
* PNG images without an alpha channel could not be displayed by in the * PNG images without an alpha channel could not be displayed by in the
terminal. #3529. terminal. #3529.
* tab width calculation when returning a string with embedded escape
sequences from a `format-tab-title` event handler. #3481
### 20230408-112425-69ae8472 ### 20230408-112425-69ae8472

View File

@ -84,8 +84,9 @@ fn call_format_tab_title(
} }
_ => { _ => {
let s = String::from_lua(v, &*lua)?; let s = String::from_lua(v, &*lua)?;
let line = parse_status_text(&s, CellAttributes::default());
Ok(Some(TitleText { Ok(Some(TitleText {
len: unicode_column_width(&s, None), len: line.len(),
items: vec![FormatItem::Text(s)], items: vec![FormatItem::Text(s)],
})) }))
} }