From b7a5f272fa0205818bd028b6bed9b828fc441aff Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 15 Nov 2025 04:37:06 -0600 Subject: fix(modeline): Align to window edge instead of buffer margin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- modules/modeline-config.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/modeline-config.el b/modules/modeline-config.el index a5e23dd0..6573671a 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 -- cgit v1.2.3