summary refs log tree commit diff stats
path: root/lib/pure/terminal.nim
Commit message (Collapse)AuthorAgeFilesLines
* Support setting foreground/background colors to terminal defaults (#8073)Kaushal Modi2018-06-241-8/+32
| | | | | | | | | | | | * Support setting foreground/background colors to terminal defaults Adds fgDefault to ForegroundColor and bgDefault to BackgroundColor enums. For Windows console, the default foreground color is assumed to be white, and the default background color black. * Add default fg/bg color caching for Windows Console
* Convert styledWriteLine and styledEcho to templatesKaushal Modi2018-06-181-35/+7
| | | | | | | | This also fixes a bug in the styledWriteLine behavior where the background color leaked onto the next newline if that command did not end with resetStyle. Now it is not necessary to end styledWriteLine calls that set BackgroundColor to end in resetStyle.
* Add styledWrite macroKaushal Modi2018-06-181-12/+74
| | | | | | | | | | | Also: - Move the tests block to the end of the file - Fix the older tests - Add tests for existing styledEcho - Add new tests for styledWrite Fixes https://github.com/nim-lang/Nim/issues/8046.
* Add support for italic and strikethrough ANSI escape codes (#8048)Kaushal Modi2018-06-171-3/+6
| | | | | | | \e[3m -> italic \e[9m -> strikethrough On terminals not supporting italic text, the text is shown in reverse instead, and on terminals not supporting strikethrough text, the text is shown as is.
* Export an 'escapeXml' proc from xmldomZahary Karadjov2018-05-071-1/+1
| | | | The interface is similar to escapeJson
* Fix the compilation of terminal.nim on WindowsZahary Karadjov2018-05-071-4/+1
|
* The `terminal` module now exports additional procs for generating ANSI colorZahary Karadjov2018-05-071-21/+43
| | | | codes as strings.
* Fixes #7764 (#7767)Florent2018-05-061-0/+4
| | | | | | | | | | * Fixes #7764 * Change KEY_RECORD_EVENT filter * Update terminal.nim * Revert changes and modify readPasswordFromStdIn
* Fix bright option (#7622)WhiteDuke2018-04-181-4/+4
| | | Setting the option to true, then to false would not turn off bright attribute.
* move `readPasswordFromStdin` from rdstdin to terminal (#7266)Vindaar2018-02-271-0/+50
|
* revert commit 6cf8a72d498f5cb8a532c2ff3259bc7aecf474ef; Windows fixes getch bugAraq2018-02-271-4/+1
|
* Fix style string formatting for cursorBackward and cursorForward (#7243)antizealot13372018-02-221-2/+2
|
* terminal.nim: code cleanupAndreas Rumpf2018-01-181-41/+27
|
* Support truecolor for the terminal stdlib module (#6936)Dmitry Atamanov2018-01-181-14/+177
|
* Windows: fix a eraseLine bug (#7044)Dmitry Atamanov2018-01-091-3/+2
|
* Windows: fixes getch bug; fixes #6966 (#7031)Dmitry Atamanov2018-01-051-1/+4
|
* Fixed compilation error (#6979)Yuriy Glukhov2017-12-271-4/+4
|
* fix #6931 terminal.eraseline() gives OverflowError on Windows (#6933)skilchen2017-12-171-2/+2
|
* Remove expr/stmt (#5857)Arne Döring2017-07-251-7/+4
|
* tiny docstring fix; fixes #5483 (#5484)Fabian Keller2017-03-051-1/+1
|
* make tests on Windows green under --pedanticAraq2017-02-021-1/+1
|
* Add terminalHeight, terminalHeightIoctl & terminalSizeJohn Novak2016-11-301-0/+48
|
* Merge pull request #5058 from johnnovak/terminal-win-fixAndreas Rumpf2016-11-291-3/+6
|\ | | | | Fix setStyle for Windows
| * Fix setStyle for WindowsJohn Novak2016-11-261-3/+6
| | | | | | | | | | | | * setStyle did not take the current color flags into account on Windows, this is fixed now * refactoring to get rid of magic constants
* | Add hideCursor & showCursorJohn Novak2016-11-261-0/+40
|/
* Use new name for call to low-level terminalWidth.Charles Blake2016-09-011-3/+3
|
* Make Windows part match Unix part more closely per Araq request.Charles Blake2016-09-011-8/+7
|
* Change type name to be more NEP-1-ish as per Araq request.Charles Blake2016-09-011-1/+1
|
* Convert TaintedString to string.Charles Blake2016-09-011-1/+1
|
* Oops - L_ctermid must be a global var to compile.Charles Blake2016-09-011-2/+2
|
* Add terminal.terminalWidth and supporting types/calls.Charles Blake2016-09-011-1/+44
|
* prepare Nim codebase for upcoming parser changesAndreas Rumpf2016-07-151-2/+2
|
* getch() asserts to doAssertsmiere432016-06-261-2/+2
|
* Removed INPUT_KEY_RECORDmiere432016-06-261-11/+6
|
* Implemented terminal.getch() for Windowsmiere432016-06-231-11/+20
|
* make terminal.nim work with --app:guiAraq2015-10-191-2/+4
|
* terminal: Support both styled stdout and stderrAdam Strzelecki2015-10-161-118/+189
| | | | | | | | | | | | This is important if we want to write styled diagnostics to stderr, eg. some tool outputting results to stdout, but writing styled error messages to stderr. Previously this module was assuming we are writing only to stdout. Now all module procs take file handle as first argument. Wrappers assuming stdout are provided for backwards compatibility. The new terminal.styledWriteLine(f, args) is provided and documented as counterpart for unstyled plain writeLine(f, args).
* terminal: Remove superflous hStdout = conHandleAdam Strzelecki2015-10-161-17/+13
| | | | Use just hStdout on Windows to keep handle to process stdout.
* renamed writeln to writeLine in libpatrick dw2015-06-191-3/+3
|
* colors: Introduce resetStyle enum & use templatesAdam Strzelecki2015-06-151-7/+28
| | | | | | | | | 1. Introduce TerminalCmd enum and resetStyle that can be issued to issue resetAttributes within styledEcho arguments. 2. Use templates to resolve styledEcho arguments for performance reasons. 3. Try to avoid calling trailing write "\n" and reset attributes where possible.
* terminal doesn't use enormous windows module anymoreAraq2015-06-101-22/+81
|
* lib/pure/p-t - Dropped 'T' from typespdw2015-06-041-13/+13
|
* terminal: doc improvmentsAraq2015-05-281-1/+7
|
* Fix Termios wrapperdef2015-04-241-6/+7
|
* Don't run non-test code when defined(testing)Oleh Prypin2015-04-211-1/+1
|
* don't use conio.h on windows (#2137)Araq2015-03-081-10/+8
|
* Document terminal.getchdef2015-02-041-0/+2
|
* Add terminal.getch to get a single characterdef2015-02-031-0/+26
|
* Fix #1906Varriount2015-01-221-3/+5
|
* updated terminal.nimAraq2014-08-291-6/+6
|
d='n988' href='#n988'>988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073