[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/golden-ratio 3d93baf3c0 94/95: Merge pull request #92 from
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/golden-ratio 3d93baf3c0 94/95: Merge pull request #92 from shouya/minimal-change |
Date: |
Thu, 7 Sep 2023 22:02:16 -0400 (EDT) |
branch: elpa/golden-ratio
commit 3d93baf3c01e8f1b72ddc8b7376db906a9c3e74e
Merge: 007911d8a4 656117e490
Author: Roman Gonzalez <roman@users.noreply.github.com>
Commit: GitHub <noreply@github.com>
Merge pull request #92 from shouya/minimal-change
Support resizing only when the change is significant
---
golden-ratio.el | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/golden-ratio.el b/golden-ratio.el
index 28a637d939..75572f0384 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 1
+ "Minimal width change needed to trigger actual window resizing."
+ :group 'golden-ratio
+ :type 'integer)
+
+(defcustom golden-ratio-minimal-height-change 1
+ "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 b78f921f56 74/95: Allow using symbols in golden-ratio-exclude-modes., (continued)
- [nongnu] elpa/golden-ratio b78f921f56 74/95: Allow using symbols in golden-ratio-exclude-modes., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 7215ffcc56 77/95: Don't shrink selected window, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 5a661d32df 80/95: Fix usage of golden-ration in gnus buffers (#49)., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 4f24b707da 82/95: Allow using golden-ration command when golden-ratio-mode is disabled (#51)., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 72b028808b 83/95: Allow buffer exclusion with regular expressions (#58)., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio d06170e2b7 84/95: fix for persp-switch-quick, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 9059e1d139 87/95: Merge pull request #66 from Bad-ptr/master, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 007911d8a4 89/95: Merge pull request #62 from arbelt/persp-fix, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 0ea8c89807 90/95: Add license header, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 362ab0ede7 91/95: Bump version to 1.0.1, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 3d93baf3c0 94/95: Merge pull request #92 from shouya/minimal-change,
ELPA Syncer <=
- [nongnu] elpa/golden-ratio 650121be18 18/95: Support exclusions based on buffer name or major mode, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 9843ca2239 20/95: Merge pull request #15 from hickinbottoms/feature/add-exemptions, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio feddcbe68b 21/95: Merge remote-tracking branch 'upstream/master', ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio ef6f8ce72d 22/95: Support exclusions based on inhabit function, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio af7c754985 24/95: Added advice on `delete-window`, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 550fb22580 32/95: * golden-ratio.el (window-width-after-balance, window-height-after-balance): new, ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 8f1cd6c9fd 38/95: * golden-ratio.el: make golden-ratio-mode global and recenter window., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 95a0633733 43/95: * golden-ratio.el: Finally allow reusing balance-windows safely. Most issues fixed now., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio 549f94c2db 44/95: * golden-ratio.el: Clean up, add some commands. Ready to merge., ELPA Syncer, 2023/09/07
- [nongnu] elpa/golden-ratio ac6ca479cc 47/95: (golden-ratio): use thereis in golden-ratio-inhibit-functions., ELPA Syncer, 2023/09/07