summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-05-13 12:17:11 +0200
committerAraq <rumpf_a@web.de>2015-05-28 12:51:17 +0200
commit3c13508b25da810f5ffabc3d2f34180d51f19ecc (patch)
tree66e751f01e757c9b9a14d1e0e7fc0ee23dc2977a
parent2b0115eb5fdf616a2cf30ec620d5b4dff7bc8e14 (diff)
downloadNim-3c13508b25da810f5ffabc3d2f34180d51f19ecc.tar.gz
terminal: doc improvments
-rw-r--r--lib/pure/terminal.nim8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/pure/terminal.nim b/lib/pure/terminal.nim
index 29f700db5..7b4d548fe 100644
--- a/lib/pure/terminal.nim
+++ b/lib/pure/terminal.nim
@@ -364,7 +364,13 @@ macro styledEcho*(m: varargs[expr]): stmt =
   result.add(newCall(bindSym"write", bindSym"stdout", newStrLitNode("\n")))
   result.add(newCall(bindSym"resetAttributes"))
 
-when not defined(windows):
+when defined(nimdoc):
+  proc getch*(): char =
+    ## Read a single character from the terminal, blocking until it is entered.
+    ## The character is not printed to the terminal. This is not available for
+    ## Windows.
+    discard
+elif not defined(windows):
   proc getch*(): char =
     ## Read a single character from the terminal, blocking until it is entered.
     ## The character is not printed to the terminal. This is not available for