[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swsw f9f64e0559 060/146: * swsw.el (swsw--get-id-length):
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swsw f9f64e0559 060/146: * swsw.el (swsw--get-id-length): Return 1 when there is one window tracked |
Date: |
Wed, 25 May 2022 02:59:44 -0400 (EDT) |
branch: elpa/swsw
commit f9f64e0559e14d36ecfe31278a505733f495f7c9
Author: Daniel Semyonov <cmstr@dsemy.com>
Commit: Daniel Semyonov <cmstr@dsemy.com>
* swsw.el (swsw--get-id-length): Return 1 when there is one window tracked
---
swsw.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/swsw.el b/swsw.el
index 597f53ab28..1bfd882ecc 100644
--- a/swsw.el
+++ b/swsw.el
@@ -141,9 +141,13 @@ 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."
- (ceiling (log
- (length (window-list-1 nil nil (swsw--get-scope)))
- (length swsw-id-chars))))
+ (let ((windows (length (window-list-1 nil nil (swsw--get-scope)))))
+ ;; If there is only one window, return 1.
+ (if (= windows 1)
+ 1
+ (ceiling (log
+ windows
+ (length swsw-id-chars))))))
(defun swsw-update-window (window)
"Update information for WINDOW."
- [nongnu] elpa/swsw dee158840a 100/146: ; Indicate that ELPA installation is not yet available, (continued)
- [nongnu] elpa/swsw dee158840a 100/146: ; Indicate that ELPA installation is not yet available, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 09bb140ee3 096/146: * swsw.el (swsw-update): Use 'dotimes' instead of 'while', ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 300a4e8e61 084/146: * swsw.el (swsw-delete): Fix when the other tracked window is a minibuffer, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 8b8c353938 143/146: ; Generate swsw-pkg.el' automatically, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 51b8c1eb7c 080/146: ; Update documentation according to latest changes, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 522bfb2da0 074/146: ; Add versioning scheme information to the NEWS file, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 92abfc5de4 119/146: ; Make some long lines short, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 910aea2c75 117/146: ; Declare all window commands should be called while 'swsw-mode' is active, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 862d945bdb 101/146: ; Ignore Emacs' backup files, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 0a3edee2e5 055/146: ; Bump version to 1.1.1 and update NEWS file, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw f9f64e0559 060/146: * swsw.el (swsw--get-id-length): Return 1 when there is one window tracked,
ELPA Syncer <=
- [nongnu] elpa/swsw 07f26210e8 086/146: ; Add 'swsw-delete' fix to the NEWS file, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 8044341fdb 040/146: ; Update README to no longer suggest binding 'C-x o' in 'swsw-mode-map', ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw cec8c4aacc 110/146: ; Edit docstrings to conform completely to 'checkdoc', ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw f08caf6f0c 137/146: ; Add build manifest, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 1411a6314c 116/146: * swsw.el (swsw--update-window): Use 'when-let' instead of 'let' and 'when', ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 53321ab4f2 069/146: ; Correct swsw-select's docstring, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 85d9c690b1 102/146: ; Add key binding to swsw-mode's docstring, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw cf70d1d22c 071/146: ; Make an if statement more readable, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 7db205a145 105/146: ; Change all instances of "‘" and "’" to "`" and "'" respectively, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 8a9686e0fe 111/146: ; Change required Emacs version according to package-lint, ELPA Syncer, 2022/05/25