about summary refs log tree commit diff stats
path: root/src/display
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-12-15 19:49:19 +0100
committerbptato <nincsnevem662@gmail.com>2022-12-15 19:49:19 +0100
commit5d8500c7169c60fe2ba3ee62f64514a65608d2c7 (patch)
tree7717f78634299eb45f5443adaa8e7a79fd2f2a8f /src/display
parenta03e810d61bb165dc7f9434fc42484e61620c4c5 (diff)
downloadchawan-5d8500c7169c60fe2ba3ee62f64514a65608d2c7.tar.gz
pager: fix getRoot returning nothing
Diffstat (limited to 'src/display')
-rw-r--r--src/display/pager.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/display/pager.nim b/src/display/pager.nim
index 9ce058f2..1a372afd 100644
--- a/src/display/pager.nim
+++ b/src/display/pager.nim
@@ -65,6 +65,7 @@ func attrs(pager: Pager): WindowAttributes = pager.term.attrs
 func getRoot(container: Container): Container =
   var c = container
   while c.parent != nil: c = c.parent
+  return c
 
 iterator all_children(parent: Container): Container {.inline.} =
   var stack = newSeqOfCap[Container](parent.children.len)