aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2025-11-15 04:37:06 -0600
committerCraig Jennings <c@cjennings.net>2025-11-15 04:37:06 -0600
commita49655abee1d45fe80a0904fc8bbf80d00bf46c5 (patch)
tree63c138328debc528abc11911f72fd84c36854d6b /modules
parent6662b48977164c5a47261a61b9354b017f375b66 (diff)
downloaddotemacs-a49655abee1d45fe80a0904fc8bbf80d00bf46c5.tar.gz
dotemacs-a49655abee1d45fe80a0904fc8bbf80d00bf46c5.zip
fix(modeline): Align to window edge instead of buffer margin
Change mode-line-right-align-edge from 'right-margin to 'window. This fixes an issue where centered text modes (nov-mode for EPUBs, etc.) with wide buffer margins would cause the right-aligned modeline elements (VC branch, weather, etc.) to have large gaps on the right side. Now the modeline always aligns to the window edge regardless of buffer margin settings.
Diffstat (limited to 'modules')
-rw-r--r--modules/modeline-config.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/modeline-config.el b/modules/modeline-config.el
index a5e23dd09..6573671a9 100644
--- a/modules/modeline-config.el
+++ b/modules/modeline-config.el
@@ -22,7 +22,9 @@
;; -------------------------- Modeline Configuration --------------------------
;; Use Emacs 30's built-in right-alignment
-(setq mode-line-right-align-edge 'right-margin)
+;; Use 'window instead of 'right-margin so centered text modes (nov-mode, etc.)
+;; don't push modeline elements inward
+(setq mode-line-right-align-edge 'window)
;; String truncation length for narrow windows
(defcustom cj/modeline-string-truncate-length 12