diff --git a/pkg/cy/api/input.go b/pkg/cy/api/input.go index 1a2026b7..bf738a86 100644 --- a/pkg/cy/api/input.go +++ b/pkg/cy/api/input.go @@ -65,7 +65,10 @@ func (i *InputModule) Find( ), fuzzy.WithResult(result), fuzzy.WithPrompt(params.Prompt), - fuzzy.WithInline(geom.Vec2{R: cursor.Y, C: cursor.X}), + fuzzy.WithInline( + geom.Vec2{R: cursor.Y, C: cursor.X}, + state.Image.Size(), + ), } if (params.Animated == nil || (*params.Animated) == true) && shouldAnimate { diff --git a/pkg/fuzzy/module.go b/pkg/fuzzy/module.go index d16ccbd1..141070ab 100644 --- a/pkg/fuzzy/module.go +++ b/pkg/fuzzy/module.go @@ -297,11 +297,11 @@ func WithResult(result chan<- interface{}) Setting { } // Displays Fuzzy as a small window at this location on the screen. -func WithInline(location geom.Vec2) Setting { +func WithInline(location, size geom.Vec2) Setting { return func(ctx context.Context, f *Fuzzy) { f.isInline = true f.location = location - f.isUp = f.location.R > (f.size.R / 2) + f.isUp = f.location.R > (size.R / 2) } }