diff options
author | Tristan Partin <tristan@partin.io> | 2024-08-16 13:19:48 -0500 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-08-20 09:30:29 +0200 |
commit | 7dd0fdeda6c9a0d2426e88c221d6ad37561dd83f (patch) | |
tree | a1c4aaa2a5e6a28c6282d825c2e565d7441abf18 /app | |
parent | f2ac5a7c3c6516289c5c07e85dad41d7379df771 (diff) | |
download | aerc-7dd0fdeda6c9a0d2426e88c221d6ad37561dd83f.tar.gz |
filters: send real COLUMNS and LINES values
Previously filters received default COLUMNS LINES values no matter the
width of the terminal.
Fixes: https://todo.sr.ht/~rjarry/aerc/232
Changelog-added: Filters will receive the actual COLUMNS and LINES
values.
Signed-off-by: Tristan Partin <tristan@partin.io>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'app')
-rw-r--r-- | app/msgviewer.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/msgviewer.go b/app/msgviewer.go index a78daa3a..8760bf74 100644 --- a/app/msgviewer.go +++ b/app/msgviewer.go @@ -556,6 +556,10 @@ func NewPartViewer( if term != nil { term.OnStart = func() { + if term.ctx != nil { + filter.Env = append(filter.Env, fmt.Sprintf("COLUMNS=%d", term.ctx.Window().Width)) + filter.Env = append(filter.Env, fmt.Sprintf("LINES=%d", term.ctx.Window().Height)) + } pv.attemptCopy() } } |