[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/window-commander 5446df0f3e 059/170: * swsw.el (swsw--g
From: |
ELPA Syncer |
Subject: |
[elpa] externals/window-commander 5446df0f3e 059/170: * swsw.el (swsw--get-id-length): Fix the calculation of the ID length |
Date: |
Wed, 28 Jun 2023 19:00:26 -0400 (EDT) |
branch: externals/window-commander
commit 5446df0f3ee4ab08bc3743a1c21d5476f86f8864
Author: Daniel Semyonov <cmstr@dsemy.com>
Commit: Daniel Semyonov <cmstr@dsemy.com>
* swsw.el (swsw--get-id-length): Fix the calculation of the ID length
---
swsw.el | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/swsw.el b/swsw.el
index e9c836fc74..597f53ab28 100644
--- a/swsw.el
+++ b/swsw.el
@@ -141,13 +141,9 @@ If set to ‘lighter’, use the mode line lighter of
‘swsw-mode’."
(defun swsw--get-id-length ()
"Return the current length of a window ID."
- (let* ((windows (length (window-list-1 nil nil (swsw--get-scope))))
- (chars (length swsw-id-chars))
- (div (/ windows chars)))
- ;; Check the remainder to avoid returning a longer length than necessary.
- (if (= 0 (mod windows chars))
- div
- (1+ div))))
+ (ceiling (log
+ (length (window-list-1 nil nil (swsw--get-scope)))
+ (length swsw-id-chars))))
(defun swsw-update-window (window)
"Update information for WINDOW."
- [elpa] externals/window-commander 40f7a25f82 047/170: ; Add license information to the title page of the Info node, (continued)
- [elpa] externals/window-commander 40f7a25f82 047/170: ; Add license information to the title page of the Info node, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 83eb90586a 051/170: ; Alter comments and docstrings to comply with Emacs' conventions, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 08b56d124c 015/170: Add support for multi-character IDs, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 96809a6cae 019/170: Add the ability to change the way window IDs are displayed, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 4c84ca310f 016/170: ; Update README to reflect recent changes, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 48db8fe39b 021/170: Add a reference implementation for a conditional display function, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 8a8be23f1b 050/170: ; Include license information in created package archives, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander ec011dc3b9 053/170: ; Fix inconsistency in URL between swsw.el and swsw-pkg.el, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 0a3edee2e5 055/170: ; Bump version to 1.1.1 and update NEWS file, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 0b67d7bc00 056/170: * swsw.el (swsw-display-function): Define early only when byte-compiling, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 5446df0f3e 059/170: * swsw.el (swsw--get-id-length): Fix the calculation of the ID length,
ELPA Syncer <=
- [elpa] externals/window-commander 095091cf33 057/170: Handle cases where there are less than three tracked windows better, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander c2c579a3c9 061/170: Construct multi-character IDs without pre-computing all possible IDs, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 7d82ffeef4 076/170: ; Small modifications to the NEWS file, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander d7fe615c3f 049/170: ; Fix inconsistency between requirements in swsw.el and swsw-pkg.el, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander cacbe44c08 058/170: ; Remove unnecessary ':group' keywords from 'defcustom' calls, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 73a241cf38 064/170: Ensure 'swsw-id-chars' is set correctly when customized, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander f66c043abc 067/170: Only call 'swsw-update' automatically when it's bound, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 53321ab4f2 069/170: ; Correct swsw-select's docstring, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander dbe46d5b86 070/170: * swsw.el (swsw-select): Don't select the next window for non-existent IDs, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 03747300a3 082/170: ; Add missing 'Window commands' entry to the detailed node listing, ELPA Syncer, 2023/06/28