about summary refs log tree commit diff stats
path: root/src/layout/engine.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout/engine.nim')
-rw-r--r--src/layout/engine.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/layout/engine.nim b/src/layout/engine.nim
index 79822cd0..66e0589b 100644
--- a/src/layout/engine.nim
+++ b/src/layout/engine.nim
@@ -1296,7 +1296,7 @@ func findNextFloatOffset(bctx: BlockContext; offset: Offset; size: Size;
   # Algorithm originally from QEmacs.
   var y = offset.y
   let leftStart = offset.x
-  let rightStart = max(offset.x + size.w, space.w.u)
+  let rightStart = offset.x + max(size.w, space.w.u)
   while true:
     var left = leftStart
     var right = rightStart