Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/ui/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ impl Cursor {
Layout::Horizontal => {
self.max_row_y = self.max_row_y.max(size.y);

if self.x + size.x < self.area.w - self.margin * 2. {
// self.x < 1.0 is a hack to not push the first item down if it is too wide to fit.
if self.x < 1.0 || self.x + size.x < self.area.w - self.margin * 2. {
res = Vec2::new(self.x, self.y);
} else {
self.x = self.margin + 1.; // +1. is a hack to make next vertical thing correctly jump to the next row
Expand Down