[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/golden-ratio 1325ecac07 92/95: support minimal change
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/golden-ratio 1325ecac07 92/95: support minimal change |
Date: |
Thu, 7 Sep 2023 22:02:16 -0400 (EDT) |
branch: elpa/golden-ratio
commit 1325ecac07a14c3566715d3ad6b9091a4d4950d8
Author: Shou Ya <shouya@users.noreply.github.com>
Commit: Shou Ya <shouya@users.noreply.github.com>
support minimal change
---
golden-ratio.el | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/golden-ratio.el b/golden-ratio.el
index 28a637d939..201cf0f270 100644
--- a/golden-ratio.el
+++ b/golden-ratio.el
@@ -92,6 +92,16 @@ will prevent the window to be resized to the golden ratio."
:type '(repeat string)
:group 'golden-ratio)
+(defcustom golden-ratio-minimal-width-change 0
+ "Minimal width change needed to trigger actual window resizing."
+ :group 'golden-ratio
+ :type 'integer)
+
+(defcustom golden-ratio-minimal-height-change 0
+ "Minimal height change needed to trigger actual window resizing."
+ :group 'golden-ratio
+ :type 'integer)
+
;;; Compatibility
;;
(unless (fboundp 'window-resizable-p)
@@ -129,9 +139,11 @@ will prevent the window to be resized to the golden ratio."
(with-selected-window (or window (selected-window))
(let ((nrow (floor (- (first dimensions) (window-height))))
(ncol (floor (- (second dimensions) (window-width)))))
- (when (window-resizable-p (selected-window) nrow)
+ (when (and (> nrow golden-ratio-minimal-height-change)
+ (window-resizable-p (selected-window) nrow))
(enlarge-window nrow))
- (when (window-resizable-p (selected-window) ncol t)
+ (when (and (> ncol golden-ratio-minimal-width-change)
+ (window-resizable-p (selected-window) ncol t))
(enlarge-window ncol t)))))
(defun golden-ratio-exclude-major-mode-p ()
- [nongnu] elpa/golden-ratio d5413c832b 75/95: Fix types in golden-ratio-exclude-modes., (continued)
- [nongnu] elpa/golden-ratio d5413c832b 75/95: Fix types in golden-ratio-exclude-modes., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio e47c29f87e 78/95: Trigger after split-window as well, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio f7bee8e221 65/95: Added width adjustment to adjust for very wide frames., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 76f5307ad0 72/95: Merge pull request #43 from EricGebhart/master, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 0287ac76fd 76/95: Simplify `golden-ratio-mode', ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 7593ba59b3 79/95: Merge pull request #48 from abo-abo/master, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio ac9bcedc63 81/95: Reenable improvements removed by error when reverting last PR., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 5e5b6c805b 85/95: Call window-configuration-change-hook only once, after the golden-ratio command., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio c5e916d238 86/95: Add fixed width feature, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio f5807212d3 88/95: Merge pull request #81 from wictory/pr_20190406, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 1325ecac07 92/95: support minimal change,
ELPA Syncer <=
- [nongnu] elpa/golden-ratio 656117e490 93/95: change default minimal change to 1, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio bf0035fd6a 95/95: Merge pull request #89 from skangas/nongnu-elpa-fixes, ELPA Syncer, 2023/09/07