branch: externals/bufferlo
commit 0063b3e17d9f9da772af737d848fbb79bc6a997d
Author: shipmints <shipmi...@gmail.com>
Commit: shipmints <shipmi...@gmail.com>

    Clamp frame size restored from a larger display
---
 bufferlo.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bufferlo.el b/bufferlo.el
index b153f168dd..6f12479b54 100644
--- a/bufferlo.el
+++ b/bufferlo.el
@@ -2409,7 +2409,11 @@ Geometry set for FRAME or the current frame, if nil."
     (when (and .left .top .width .height) ; defensive in case geometry stored 
from a tty
       (set-frame-position nil .left .top)
       (sit-for 0 t)
-      (set-frame-size nil .width .height 'pixelwise)
+      ;; Clamp frame size restored from a larger display
+      (set-frame-size nil
+                      (min .width (display-pixel-width))
+                      (min .height (display-pixel-height))
+                      'pixelwise)
       (sit-for 0))))
 
 (defvar bufferlo--active-sets nil

Reply via email to