about summary refs log tree commit diff stats
path: root/termattrs.nim
diff options
context:
space:
mode:
Diffstat (limited to 'termattrs.nim')
-rw-r--r--termattrs.nim7
1 files changed, 3 insertions, 4 deletions
diff --git a/termattrs.nim b/termattrs.nim
index 21fd3b04..d49800ae 100644
--- a/termattrs.nim
+++ b/termattrs.nim
@@ -6,7 +6,6 @@ type
     termHeight*: int
 
 proc getTermAttributes*(): TermAttributes =
-  var t = TermAttributes()
-  t.termWidth = terminalWidth()
-  t.termHeight = terminalHeight()
-  return t
+  let attrs = TermAttributes(termWidth: terminalWidth(),
+                             termHeight: terminalHeight())
+  return attrs