[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/golden-ratio b974b0b129 1/2: Fix for the window margins
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/golden-ratio b974b0b129 1/2: Fix for the window margins |
Date: |
Sat, 9 Sep 2023 15:59:27 -0400 (EDT) |
branch: elpa/golden-ratio
commit b974b0b129d653b63b1ee0a435eeaa81e642946f
Author: Jinseop Kim <vmfhrmfoaj@gmail.com>
Commit: Jinseop Kim <iam@jinseop.kim>
Fix for the window margins
---
golden-ratio.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/golden-ratio.el b/golden-ratio.el
index de90a429fc..671e06d241 100644
--- a/golden-ratio.el
+++ b/golden-ratio.el
@@ -154,8 +154,9 @@ will prevent the window to be resized to the golden ratio."
(defun golden-ratio--resize-window (dimensions &optional window)
(with-selected-window (or window (selected-window))
- (let ((nrow (floor (- (first dimensions) (window-height))))
- (ncol (floor (- (second dimensions) (window-width)))))
+ (let* ((m (window-margins))
+ (nrow (floor (- (first dimensions) (window-height))))
+ (ncol (floor (- (second dimensions) (+ (window-width) (or (car m)
0) (or (cdr m) 0))))))
(when (and (> nrow golden-ratio-minimal-height-change)
(window-resizable-p (selected-window) nrow))
(enlarge-window nrow))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/golden-ratio b974b0b129 1/2: Fix for the window margins,
ELPA Syncer <=