summary refs log tree commit diff stats
path: root/lib/pure/terminal.nim
Commit message (Collapse)AuthorAgeFilesLines
* Fix #12759 (#14967)flywind2020-07-121-1/+1
| | | | | * add testcase for #5926 * fix #12759
* nimgrep improvements (#12779)Andrey Makarov2019-12-051-5/+12
| | | | | | | | | | | | | | | | | | * fix sticky colors in styledWrite * nimgrep: context printing, colorthemes and other * add context printing (lines after and before a match) * nimgrep: add exclude/include options * nimgrep: improve error printing & symlink handling * nimgrep: rename dangerous `-r` argument * add a `--newLine` style option for starting matching/context lines from a new line * add color themes: 3 new themes besides default `simple` * enable printing of multi-line matches with line numbers * proper display of replace when there was another match replaced at the same line / context block * improve cmdline arguments error reporting
* [backport] run nimpretty on the remaining filesnarimiran2019-09-301-73/+75
|
* [refactoring] remove unused imports in the compiler and in some stdlib modulesAraq2019-07-181-1/+1
|
* there is only one style -- my styleAraq2019-07-101-16/+16
|
* styleCheck: make the compiler and large parts of the stdlib compatible with ↵Araq2019-07-101-23/+23
| | | | --styleCheck:error
* fixes #11005Araq2019-04-121-3/+3
|
* fixes #8294 [backport]Araq2019-01-151-1/+1
|
* removes deprecated T/P typesAraq2018-11-161-6/+0
|
* fix #9394 by replacing `fmt` with `strutils.%` (#9417)Vindaar2018-10-181-3/+5
| | | | | | | | * fix #9394 by replacing `fmt` with normal string append Until issue #7632 is fixed, use string append. * use `strutils.%` instead of normal string add
* Fix setCursorPos and setCursorXPos on POSIX (#8310)John Novak2018-07-171-2/+2
|
* Fix terminal.nim to be GCSAFE. (#8296)Eugene Kabanov2018-07-121-85/+73
| | | * Also fix deprecated callsite().
* Make the Style enum a proper Ordinal (no holes) (#8282)Kaushal Modi2018-07-121-4/+7
| | | The Style enum needs to be an Ordinal so that it can be used in sets.
* 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).