small update

This commit is contained in:
daa 2018-04-04 23:47:32 +03:00
parent ccd4781a9c
commit 8e8d8ba0da
1 changed files with 1 additions and 0 deletions

View File

@ -477,6 +477,7 @@ impl CmdLine {
popup_menu::update_css(&self.wild_css_provider, &render_state.color_model);
// set width
// this calculation produce width more then needed, but this is looks ok :)
let max_item_width = (items.iter().map(|item| item.len()).max().unwrap() as f64
* render_state.font_ctx.cell_metrics().char_width) as i32
+ self.state.borrow().levels.last().unwrap().preferred_width;