emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/visual-fill-column 930c5b2c42 047/137: Add note about text


From: ELPA Syncer
Subject: [nongnu] elpa/visual-fill-column 930c5b2c42 047/137: Add note about text size adjustments to README.
Date: Sun, 2 Jan 2022 22:59:11 -0500 (EST)

branch: elpa/visual-fill-column
commit 930c5b2c42c3fc5e9b6763fae776cd1a373d3577
Author: Joost Kremers <joostkremers@fastmail.fm>
Commit: Joost Kremers <joostkremers@fastmail.fm>

    Add note about text size adjustments to README.
---
 README.md | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/README.md b/README.md
index af99c7e953..8bdfbbcc3c 100644
--- a/README.md
+++ b/README.md
@@ -24,6 +24,13 @@ Widening the margin causes the fringe to be pushed inward. 
For this reason, the
 
 Note that Emacs won’t vertically split a window (i.e., into two side-by-side 
windows) that has wide margins. As a result, displaying buffers such as 
`*Help*` buffers, `*Completion*` buffers, etc., won’t split a window 
vertically, even if there appears to be enough space for a vertical split. This 
is not problematic, but it may be undesirable. To remedy this, you can set the 
option `split-window-preferred-function` to 
`visual-fill-column-split-window-sensibly`. This function first unsets  [...]
 
+The width of the margins is adjusted for the text size. However, interactive 
adjustments (e.g., with `text-size-adjust`) cannot be detected by 
`visual-fill-column-mode`, therefore if you adjust the text size while 
`visual-fill-column-mode` is active, the margins won't be adjusted. To remedy 
this, you can force a redisplay, e.g., by switching buffers, splitting and 
unsplitting the window or calling `redraw-display`.
+
+Alternatively, you can advise the function `text-size-adjust` (or whatever 
function you use to adjust the text size) with the function 
`visual-fill-column-adjust-window`:
+
+    (advice-add 'text-scale-adjust :after
+      #'visual-fill-column-adjust-window)
+
 
 ## Options ##
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]