prevent cursor from sticking out of paragraph

This commit is contained in:
Takayuki Maeda 2021-09-16 19:18:54 +09:00
parent 9c46512f70
commit 08be3dbeac

View File

@ -181,7 +181,8 @@ impl DrawableComponent for TableFilterComponent {
.map_or(String::new(), |table| table.name.to_string()) .map_or(String::new(), |table| table.name.to_string())
.width() .width()
+ 1) as u16) + 1) as u16)
.saturating_add(self.input_cursor_position), .saturating_add(self.input_cursor_position)
.min(area.right().saturating_sub(2)),
area.y + 1, area.y + 1,
) )
} }