aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-03-30 14:38:39 +0100
committerbptato <nincsnevem662@gmail.com>2024-03-30 14:41:33 +0100
commit290f82240f429ae4284aa385f0e40c59ef25a07a (patch)
tree5c298558098f005eb5c241f9b16144a4a7c20c67 /src
parentc05f5a508f172c23ecf5606879a4b8b2332572a4 (diff)
downloadchawan-290f82240f429ae4284aa385f0e40c59ef25a07a.tar.gz
pager: exclude status line from buffer height
Diffstat (limited to 'src')
-rw-r--r--src/local/container.nim4
-rw-r--r--src/local/pager.nim6
2 files changed, 9 insertions, 1 deletions
diff --git a/src/local/container.nim b/src/local/container.nim
index 2acd7d8a..3772b0b0 100644
--- a/src/local/container.nim
+++ b/src/local/container.nim
@@ -1550,6 +1550,10 @@ proc windowChange*(container: Container; attrs: WindowAttributes) =
container.width = attrs.width
container.height = attrs.height - 1
if container.iface != nil:
+ var attrs = attrs
+ # subtract status line height
+ attrs.height -= 1
+ attrs.height_px -= attrs.ppl
container.iface.windowChange(attrs).then(proc() =
container.needslines = true
)
diff --git a/src/local/pager.nim b/src/local/pager.nim
index 25042f5f..0d1088d2 100644
--- a/src/local/pager.nim
+++ b/src/local/pager.nim
@@ -1600,11 +1600,15 @@ proc connected(pager: Pager; container: Container; response: Response) =
else:
container.flags.excl(cfIsHTML)
# buffer now actually exists; create a process for it
+ var attrs = pager.attrs
+ # subtract status line height
+ attrs.height -= 1
+ attrs.height_px -= attrs.ppl
container.process = pager.forkserver.forkBuffer(
container.config,
container.url,
container.request,
- pager.attrs,
+ attrs,
mailcapRes.ishtml,
container.charsetStack
)