diff --git a/lib/pure/terminal.nim b/lib/pure/terminal.nim index 329c50f3ee..90be431301 100644 --- a/lib/pure/terminal.nim +++ b/lib/pure/terminal.nim @@ -162,11 +162,11 @@ else: return int(win.ws_col) return 0 + var L_ctermid{.importc, header: "".}: cint proc terminalWidth*(): int = - ## Returns **some** reasonable terminal width from either standard file + ## Returns some reasonable terminal width from either standard file ## descriptors, controlling terminal, environment variables or tradition. - var L_ctermid{.importc, header: "".}: cint var w = terminalWidthIoctl([0, 1, 2]) #Try standard file descriptors if w > 0: return w var cterm = newString(L_ctermid) #Try controlling tty