about summary refs log tree commit diff stats
path: root/src/local/pager.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-02-17 13:29:15 +0100
committerbptato <nincsnevem662@gmail.com>2024-02-17 13:30:15 +0100
commit3fe649010975686e9072678e4a4aafef6e4241fc (patch)
treea9a5eeaf5338eaba60e658240599faf6b7121588 /src/local/pager.nim
parent4e264e9d75844382e81bd8315671ca7e2f7bade3 (diff)
downloadchawan-3fe649010975686e9072678e4a4aafef6e4241fc.tar.gz
winattrs: remove unnecessary call, fix height_px fallback
no need for every new buffer to query the window size
Diffstat (limited to 'src/local/pager.nim')
-rw-r--r--src/local/pager.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/local/pager.nim b/src/local/pager.nim
index eb6e531d..ac241d73 100644
--- a/src/local/pager.nim
+++ b/src/local/pager.nim
@@ -448,12 +448,13 @@ proc addContainer*(pager: Pager, container: Container) =
   pager.setContainer(container)
 
 proc newBuffer(pager: Pager, bufferConfig: BufferConfig, source: BufferSource,
-    title = "", redirectdepth = 0, canreinterpret = true,
-    fd = FileHandle(-1)): Container =
+    title = "", redirectdepth = 0, canreinterpret = true, fd = FileHandle(-1)):
+    Container =
   return newBuffer(
     pager.forkserver,
     bufferConfig,
     source,
+    pager.attrs,
     title,
     redirectdepth,
     canreinterpret,