Log

Author Commit Date CI Message
Nick Gasson e153bd83 2014-01-06T11:04:02 Fix escape sequence processing when only one byte available The read call in the escape sequence processing does not handle the case where only the first byte is available. This can happen for example on a slow serial terminal. Comment by @antirez: I reworked the code for brevity, for historical reasons here is the proposed patch. I believe my fix should be functionally equivalent. Original fix: case 27: /* escape sequence */ /* Read the next two bytes representing the escape sequence. */ - if (read(fd,seq,2) == -1) break; + { + ssize_t b = read(fd, seq, 2); + + if (b < 0) break; + + if (b == 1) { + b = read(fd,&seq[1], 1); + if (b != 1) { + break; + } + } + } See PR #47.
antirez 8d456682 2014-03-12T16:28:32 Merge branch 'master' of github.com:/antirez/linenoise
Nick Gasson fb238590 2014-01-06T11:01:41 Add extern "C" around linenoise.h when compiled as C++
Salvatore Sanfilippo 3cc30b1b 2014-03-12T16:23:24 Merge pull request #48 from nickg/emacs Add "emacs" to unsupported_term
Salvatore Sanfilippo 94cbdd65 2014-03-12T16:22:13 Merge pull request #49 from polch/master_fixes fix linenoiseEdit buflen decreasing.
Salvatore Sanfilippo ff91a64c 2014-03-12T16:19:51 Merge pull request #51 from MartinNowak/const use const char * when modification isn't necessary
antirez 01cd117f 2014-03-12T16:18:18 Don't assume STDIN_FD and STDOUT_FD are interchangeable.
Shengwen1997 49635f1c 2014-01-16T22:26:24 Add the key enumeration
antirez 8ea25f8d 2014-03-12T15:38:37 Debugging code cleanup.
antirez f3a4e062 2014-03-12T13:12:29 Merge branch 'master' of git://github.com/antirez/linenoise
antirez cbf172f7 2014-03-12T13:10:44 Handle malloc error in linenoiseAddCompletion(). We just don't add the entry on out of memory to avoid to break the API with previous versions of Linenoise.
antirez aed9d1af 2014-03-12T13:04:22 Refresh line with single write to avoid flickering. Escape sequences and actual content to write to the terminal is now accumulated into an heap allocated buffer that is flushed with a single write at the end. This avoids a flickering effect making linenoise more professional looking ;-)
Salvatore Sanfilippo 2022fb1f 2014-02-21T10:48:29 Merge pull request #53 from insop/master fix incorrect type caused issue on 64bit powerpc
Insop Song 5f5cc2ea 2014-02-21T01:21:13 fix incorrect type caused issue on 64bit powerpc Signed-off-by: Insop Song <insop.song@gainspeed.com>
Martin Nowak 9031c808 2014-01-28T00:53:26 use const char * when modification isn't necessary
Paul Chavent 3258af5a 2014-01-15T22:52:18 fix linenoiseEdit buflen decreasing.
Nick Gasson 4642c1ae 2014-01-06T11:19:36 Add "emacs" to unsupported_term The Emacs terminal emulator has its own line editing and does not behave correctly in raw mode. Without this programs using linenoise will hang when run inside an Emacs shell.
Salvatore Sanfilippo 27a3b4d5 2013-02-08T03:33:05 Merge pull request #31 from fperrad/buildroot fix getColumns() for Buildroot
antirez 59a4fc96 2013-02-08T12:24:07 Example app improved.
antirez 64e109e2 2013-02-08T12:18:42 linenoiseHistorySetMaxLen() was broken and never tested. Fixed.
antirez 5654f543 2013-02-08T00:12:39 Merge branch 'master' of git://github.com/antirez/linenoise
antirez 892ec0fe 2013-02-08T00:12:01 Completion fixed (broken during refactoring).
Salvatore Sanfilippo dac42999 2013-02-07T15:05:56 Merge pull request #30 from shvechikov/patch-1 Typo: readl -> real
antirez 4cc1ac49 2013-02-07T17:31:25 Merge branch 'master' of git://github.com/antirez/linenoise
antirez 09ddc709 2013-02-07T17:30:49 Fix to multi-line mode when deleting cross-line with cursor at EOL.
Salvatore Sanfilippo d6373b31 2013-02-07T08:18:29 Merge pull request #37 from spullara/patch-1 Reducing the lines of code from 1 million to 1 thousand
Sam Pullara d7f2c5c5 2013-02-07T08:17:39 Reducing the lines of code from 1 million to 1 thousand
antirez 752175d6 2013-02-07T17:02:48 Linenoise is now ~1000 lines of code, not 400.
antirez 40a361d1 2013-02-07T16:59:43 README updated.
antirez 04eb8546 2013-02-07T16:57:09 Better option parsing for the example program.
antirez 16d398e6 2013-02-07T16:06:16 Experimental multi-line editing capabilities.
antirez 381bdee2 2013-02-06T12:49:06 Update year in copyright notice.
antirez 0f3b8134 2013-02-06T12:41:15 Escapes dispatching better documented.
antirez 21447864 2013-02-06T12:38:36 Ctrl-w refactored into linenoiseEditDeletePrevWord().
antirez 57b3f761 2013-02-06T12:32:42 Clarified with ctrl-t does in comments.
antirez 4d166e4f 2013-02-06T12:28:29 Backspace functionality refactored into linenoiseEditBackspace() function.
antirez 9e15fd42 2013-02-06T12:20:01 Delete and ctrl-d refactored into linenoiseEditDelete()
antirez 62a30cac 2013-02-06T12:08:19 Off-by-one overflow fixed. Was a silent bug before refactoring.
antirez 07fb96da 2013-02-05T23:01:32 Refactoring WIP #1: split in functions.
antirez 44a5f2a9 2013-02-05T19:52:01 More stuff on .gitignore
antirez 93340526 2013-02-05T19:51:03 Refactoring: code split into sections. Chars insertion as a function.
antirez b7a76cd8 2013-02-05T19:34:10 linenosePrompt() -> linenoiseEdit().
antirez bb192237 2013-02-05T19:26:07 README updated (we know have completion).
antirez 96fd7d41 2013-02-05T19:25:08 All functions commented.
antirez 5e5b0cf5 2013-02-05T18:49:19 Refactoring: editing state is now a structure.
Francois Perrad fac5a1cb 2012-10-03T09:33:04 fix getColumns() for Buildroot same behaviour in ncurses (drv_size() in tinfo/tinfo_driver.c)
Salvatore Sanfilippo 8c9b4812 2012-10-02T11:22:59 Merge pull request #18 from gsserge/master Yet Another Ctrl+W
Leonid Shvechikov 7c0ec84e 2012-08-24T20:44:20 Typo: readl -> real
Sergey Glushchenko 98ca0397 2011-06-30T22:03:46 Add ctrl-w: delete previous word
antirez 02d79351 2011-03-30T17:08:20 switched to two-clause simplified BSD license
antirez 6cdc7758 2011-02-22T17:38:49 Support for ctrl-d deleting the char at right of the cursor added
antirez 03e8e4da 2010-12-10T19:21:28 suppress a warning on Linux adding some truly stupid code
antirez 7f669091 2010-12-01T11:11:55 Ctrl-l support to clear the screen. New sequences added documented.
antirez 32217662 2010-11-30T11:37:48 gitignore added
antirez f4508efb 2010-11-30T11:34:06 Pieter Noordhuis copyright notice added, since this was a major contribution. README updated.
Pieter Noordhuis 778de19a 2010-11-29T20:35:20 Show original buffer when completion is aborted
Pieter Noordhuis 493a5501 2010-11-29T18:52:55 Minimal framework for autocompletion
antirez 7534b883 2010-09-24T17:05:18 support for delete key, thanks to jgriffiths (on github)
antirez ce845468 2010-07-07T18:26:23 Support API to save/load history on file
antirez 28884b52 2010-07-07T18:05:11 Fixed another mem leak
antirez 42ba034e 2010-07-07T13:28:26 enabled debugging symbols in Make, used NULL instead of 0 introduced for a typo
antirez 6a0775fd 2010-07-07T13:19:29 Fixed one memleak, investigating the next one
antirez 10a81c0f 2010-06-02T03:21:03 README modified, again
antirez bb6b19ea 2010-06-02T03:19:42 README modified
antirez aca8b8d3 2010-04-30T09:19:04 Revert to fgets if stdin is not a tty
antirez 6770cf56 2010-03-24T22:13:51 eterm removed from the blacklist
antirez 1e32ee64 2010-03-24T09:59:34 support for blacklist terminals, reverting to fgets.
antirez 085daf39 2010-03-23T20:10:06 README changes
antirez 9a986552 2010-03-23T13:49:32 now the API to add an history entry has a const argument
antirez 9c21ea23 2010-03-22T19:54:24 ctrl-t implemented
antirez c56aa8d1 2010-03-22T19:49:56 supported more emacs bindings, don't wrap history forever but blocks on first and last item
antirez 5783c318 2010-03-22T17:26:58 minor doc update
antirez 2c54c88c 2010-03-22T17:24:28 API converted to be readline alike. Ctrl-d behavior fixed.
antirez 17a7d33e 2010-03-22T02:55:22 minor doc update
antirez f9716177 2010-03-22T02:40:53 More precise motivations in README
antirez 1ef01419 2010-03-22T02:30:34 Ctrl-h problem fixed
antirez acdf9c7d 2010-03-22T01:25:21 More internals documentation
antirez 353828e0 2010-03-22T01:09:25 references comments updated with more links to escape sequences documentation
antirez e5dee800 2010-03-21T22:27:09 Fix for an history bug
antirez 773b5d28 2010-03-21T22:16:46 README changes
antirez 7f4de381 2010-03-21T11:10:54 Ctrl+a and Ctrl+e support
antirez 4b9fe358 2010-03-21T11:06:56 Support for Ctrl+u added
antirez 62be1667 2010-03-21T11:03:33 Ctrl+K support
antirez df5b3177 2010-03-21T10:29:32 README changes
antirez e9abbeb8 2010-03-21T10:27:51 README changes
antirez 7a8f39a6 2010-03-21T10:26:10 README added
antirez 6de19082 2010-03-21T00:01:52 first commit