aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorKoni Marti <koni.marti@gmail.com>2023-10-02 16:29:15 +0200
committerRobin Jarry <robin@jarry.cc>2023-10-13 00:31:57 +0200
commit14baf17f4bd47377403c5d965c1fe294d2ec6ef0 (patch)
tree57a56dd2ce7e0e67093af0ec3912e74aed0cd3f8 /config
parent3b1bc60f4e8f11c3244097c714db15bbf34d806e (diff)
downloadaerc-14baf17f4bd47377403c5d965c1fe294d2ec6ef0.tar.gz
switcher: add scrollbar
Add scrollbar to part switcher. Add config value "max-mime-height" to the [Viewer] section to set the maximum height before a scrollbar is drawn. The part switcher height is restricted to half of the context height. Update docs. Fixes: https://todo.sr.ht/~rjarry/aerc/194 Signed-off-by: Koni Marti <koni.marti@gmail.com> Tested-by: Inwit <inwit@sindominio.net> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'config')
-rw-r--r--config/aerc.conf8
-rw-r--r--config/viewer.go1
2 files changed, 9 insertions, 0 deletions
diff --git a/config/aerc.conf b/config/aerc.conf
index 4b4e7cb6..18c6decc 100644
--- a/config/aerc.conf
+++ b/config/aerc.conf
@@ -377,6 +377,14 @@
# Default: false
#always-show-mime=false
+# Define the maximum height of the mimetype switcher before a scrollbar is used.
+# The height of the mimetype switcher is restricted to half of the display
+# height. If the provided value for the height is zero, the number of parts will
+# be used as the height of the type switcher.
+#
+# Default: 0
+#max-mime-height = 0
+
# Parses and extracts http links when viewing a message. Links can then be
# accessed with the open-link command.
#
diff --git a/config/viewer.go b/config/viewer.go
index 8ebe82a5..6d8a9957 100644
--- a/config/viewer.go
+++ b/config/viewer.go
@@ -10,6 +10,7 @@ type ViewerConfig struct {
Alternatives []string `ini:"alternatives" default:"text/plain,text/html" delim:","`
ShowHeaders bool `ini:"show-headers"`
AlwaysShowMime bool `ini:"always-show-mime"`
+ MaxMimeHeight int `ini:"max-mime-height" default:"0"`
ParseHttpLinks bool `ini:"parse-http-links" default:"true"`
HeaderLayout [][]string `ini:"header-layout" parse:"ParseLayout" default:"From|To,Cc|Bcc,Date,Subject"`
KeyPassthrough bool