[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swsw 5446df0f3e 059/146: * swsw.el (swsw--get-id-length):
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swsw 5446df0f3e 059/146: * swsw.el (swsw--get-id-length): Fix the calculation of the ID length |
Date: |
Wed, 25 May 2022 02:59:44 -0400 (EDT) |
branch: elpa/swsw
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."
- [nongnu] elpa/swsw ddfed7b727 012/146: * swsw.el (swsw-mode): Add a sparse keymap., (continued)
- [nongnu] elpa/swsw ddfed7b727 012/146: * swsw.el (swsw-mode): Add a sparse keymap., ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 8b74678bcf 028/146: * swsw.el (swsw-display-function): Avoid byte compilation warning, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 2d2edca2c3 029/146: ; Add 'Usage:' section to the commentary, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 54ca1baa14 030/146: ; Restructure README and commentary, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw c0f5277538 045/146: ; Update the URL property of the package, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw b3f6cee6af 068/146: ; Unify information in the README and commentary, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw ca14f1d0c5 107/146: Mark some variables as risky local variables, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 57e9986858 141/146: ; Small documentation fixes, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 3882424448 099/146: ; Bump to version 2.0.2, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw ccab7194a7 133/146: Use 'custom-initialize-changed' to initialize some user options, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 5446df0f3e 059/146: * swsw.el (swsw--get-id-length): Fix the calculation of the ID length,
ELPA Syncer <=
- [nongnu] elpa/swsw af99790728 123/146: ; Various cosmetic changes to NEWS, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw af63260c0e 134/146: ; Update package URL to https://dsemy.com/projects/swsw, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw ff38ec1c24 124/146: ; Bump required Emacs version to 27.1 due to 'window-state-change-hook', ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw c378be9bae 130/146: ; Load 'subr-x' when compiling, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 2e4ca2b354 091/146: ; Don't specify -r when issuing rm in the Makefile's clean target, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw dc96f71732 122/146: Update window information when switching frames, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw ccf0d780a5 078/146: Add support for custom window commands, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 2a8c7c6533 126/146: ; Document the bump to Emacs version 27.1, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 61700ece84 135/146: ; Fix indentation in a few places, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 6e036789af 103/146: ; Small Makefile modifications, ELPA Syncer, 2022/05/25