mirror of
https://github.com/sxyazi/yazi.git
synced 2024-12-19 06:41:35 +03:00
feat: make width of completion relative to input (#353)
This commit is contained in:
parent
c41397957d
commit
7512b2c63e
@ -38,7 +38,12 @@ impl<'a> Widget for Completion<'a> {
|
||||
|
||||
let input_area = self.cx.area(&self.cx.input.position);
|
||||
let mut area = self.cx.area(&Position::Sticky(
|
||||
Rect { x: 1, y: 0, width: 20, height: items.len() as u16 + 2 },
|
||||
Rect {
|
||||
x: 1,
|
||||
y: 0,
|
||||
width: input_area.width.saturating_sub(2),
|
||||
height: items.len() as u16 + 2,
|
||||
},
|
||||
input_area,
|
||||
));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user