aboutsummaryrefslogtreecommitdiff
path: root/linenoise.c
AgeCommit message (Collapse)AuthorFilesLines
2016-09-05linenoise: Add support for utf-8 wide charsSteve Bennett1-9/+18
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-09-05Update linenoise to the latest versionSteve Bennett1-56/+171
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-11-06Fix [string tolower] buffer overflow for non-utf8Steve Bennett1-10/+0
Reported-by: Andy <jimdevel@hummypkg.org.uk> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-08-12Update linenoise.c from githubSteve Bennett1-28/+16
For the following change: Fix a couple of compiler warnings With the colour prompt support. Also recognize '\e[m' as an escape sequence. Simplify countColorControlChars(). Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-07-24Update linenoise.c to match recent githubSteve Bennett1-19/+209
From git://github.com/msteveb/linenoise.git Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-12-14Update linenoise.c to match recent githubSteve Bennett1-9/+20
From git://github.com/msteveb/linenoise.git Allow tab-completion only at the end of line Replace magic number 9 with '\t' in linenoisePrompt() Fix several warnings from gcc. Fix first-chance exceptions in Windows - WriteConsoleOutputCharacter() didn't have its final parameter set Add MSVC support - Test for _WIN32 to check for building for Windows.
2012-10-31Fix linenoise serial console window size for vt102Steve Bennett1-9/+9
This includes minicom, which doesn't support hpa (CHA), only cuf. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-10-19Fix a linenoise bug when moving off the leftSteve Bennett1-1/+1
If the buffer is too big to fit in the window and the cursor would move off the left edge of the windows, the display is not shown correctly. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-10-18Sync linenoise with githubSteve Bennett1-39/+45
Update comments, copyright, etc. Handle additional home, end sequences Don't add duplicate lines into history Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-09-14Linenoise support for win32 consoleSteve Bennett1-0/+173
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-09-14Restructure linenoise in prep. for win32 supportSteve Bennett1-342/+361
Separate out the termios-specific code Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-09-14Minor linenoise improvementsSteve Bennett1-18/+14
From github: - CHA is 1-based - Added some casts to make it easier to include in a c++ - const correctness - chars are unsigned if not utf-8
2011-09-12Remove all trailing whitespace in sourceSteve Bennett1-2/+2
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-09Use autosetup instead of autoconfSteve Bennett1-1/+1
Faster, simpler auto-configuration Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-07Ensure that linenoise history is only freed onceSteve Bennett1-0/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-03Fix some clang warningsSteve Bennett1-0/+4
And also a potentially undefined integer left shift Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-08Update linenoise to the latest versionSteve Bennett1-113/+266
From https://github.com/msteveb/linenoise with minor changes. - Optimise common insert/remove char cases - Add completion framework (unused in Jim Tcl) Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-08Add linenoise support for ^LSteve Bennett1-0/+18
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-05Better line editing on serial terminalsSteve Bennett1-10/+56
If TIOCGWINSZ doesn't work, try to query the window width with escape sequences. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-05Fix line editing when columns unavailableSteve Bennett1-1/+1
Sometimes TIOCGWINSZ succeeds but returns columns=0 This makes line editing work rather badly. If this occurs, just behave as though TIOCGWINSZ had failed and assume 80 columns. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-12-21Minor compiler warning fixesSteve Bennett1-5/+8
Also, don't define _XOPEN_SOURCE if already defined Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17Linenoise improvement for ^DSteve Bennett1-4/+13
Use default readline/bash behaviour of deleting char to the right, unless the line is empty. Then it is EOF. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17Minor cleanupsSteve Bennett1-1/+0
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17Add utf-8 support to linenoise.cSteve Bennett1-171/+387
Plus general improvements, including: - Allow pasting newlines to linenoise. Use TCSADRAIN, not TCAFLUSH so that unused input is not flushed Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-17Add command line editing with linenoiseSteve Bennett1-0/+742
Enabled by default, but can be disabled with --disable-lineedit Signed-off-by: Steve Bennett <steveb@workware.net.au>