|
d7719570
|
2023-11-22T16:41:15
|
|
fix compilation with clang
|
|
72cea204
|
2022-12-08T01:11:12
|
|
licence
|
|
d895173d
|
2024-02-23T08:59:30
|
|
Merge pull request #221 from 9Ajiang/master
advance enableRawMode() before getColumns()
|
|
4111f1d6
|
2024-02-23T15:44:25
|
|
advance enableRawMode() before getColumns()
|
|
93b2db9b
|
2023-03-27T13:17:49
|
|
Multiplexing: documentation improved.
|
|
3476ccc9
|
2023-03-27T10:36:03
|
|
Multiplexing: README updated.
|
|
8087db33
|
2023-03-27T10:07:44
|
|
Multiline: just remember last num of rows, not max.
For some reason, the old code was always cleaning the maximum number of
rows used so far while editing in multi line mode. Actually we need to
clean just the number of rows used by the last line. The old behavior
created problems in multiplexing mode, where the line is refreshed at a
different row, if the user used linenoiseHide() / show() in order to
print something. With the new behavior, all looks fine, so far.
|
|
81f44df6
|
2023-03-27T09:36:31
|
|
Multiplexing: fix line refresh in completion mode.
|
|
a1d8e181
|
2023-03-27T09:21:31
|
|
Multiplexing: make completion non-blocking as well.
|
|
65db823f
|
2023-03-26T23:27:33
|
|
Some documentation and comments updates.
|
|
c9d36d06
|
2023-03-26T22:22:40
|
|
Multiplexing: API refactoring, no TTY support.
|
|
dbfe83bb
|
2023-03-26T16:44:29
|
|
Multiplexing: fix refreshMultiLine().
|
|
622c777f
|
2023-03-26T16:42:22
|
|
Multiplexing: implement example using it.
|
|
c9123ec3
|
2023-03-26T13:23:59
|
|
Multiplexing: hide/show current line.
|
|
0d66aaca
|
2023-03-26T11:04:08
|
|
Multiplexing: code refactored into calls for each step.
|
|
97d2850a
|
2020-03-12T15:51:45
|
|
Use unsigned int instead of uint like rest of code base.
|
|
4ce393a6
|
2020-03-12T15:48:04
|
|
Merge pull request #185 from yossigo/fix-c99-warning
Fix compilation in non C99/C11 mode.
|
|
8c1c63c5
|
2020-03-12T14:48:36
|
|
Fix compilation in non C99/C11 mode.
|
|
fc9667a8
|
2020-03-05T10:44:35
|
|
Merge pull request #183 from lifubang/fixmasking
fix masking input when there is no hintsCallback
|
|
ec5e4e87
|
2020-03-03T08:35:19
|
|
fix masking input when there is no hintsCallback
Signed-off-by: lifubang <lifubang@acmcoder.com>
|
|
4261898b
|
2020-03-02T17:06:38
|
|
A few improvements to mask mode.
|
|
f31e883a
|
2020-03-02T16:56:27
|
|
Merge pull request #182 from lifubang/masking
add mask input mode
|
|
514b09cd
|
2020-02-29T12:30:55
|
|
add mask input mode
Signed-off-by: lifubang <lifubang@acmcoder.com>
|
|
4a961c01
|
2018-07-18T18:29:05
|
|
Merge pull request #151 from hoelzro/master
Set seq to empty string if color/bold not used
|
|
cc2ea638
|
2018-07-18T18:27:56
|
|
Merge pull request #152 from fbrusch/master
Update README.markdown
|
|
cc53ed4b
|
2018-04-22T12:43:43
|
|
Update README.markdown
Fix little typo
|
|
b12f6ba9
|
2018-02-15T22:38:41
|
|
Set seq to empty string if color/bold not used
Otherwise the subsequent abAppend will concatenate whatever junk data
is in seq to ab
|
|
2105ce44
|
2017-06-20T11:30:07
|
|
README: add related projects section.
|
|
c894b9e5
|
2016-07-29T11:25:35
|
|
Fix insecure history file creation.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=832460.
This patch was kindly contributed by Chris Lamb (@lamby).
|
|
2eb49568
|
2016-04-13T12:19:04
|
|
Clear hints after newline.
|
|
a64257a8
|
2016-04-12T18:44:46
|
|
Hints: when only bold is set, use color 37 (white).
|
|
24c52baa
|
2016-04-12T18:35:43
|
|
Linenoise API documented.
|
|
24e401c2
|
2016-04-12T18:35:12
|
|
Use sane defaults for hints color and bold.
|
|
ae5f793e
|
2016-04-12T18:08:33
|
|
linenoiseFree() API introduced.
|
|
12a8680d
|
2016-04-12T17:59:33
|
|
Hints WIP
|
|
d97e7665
|
2016-04-06T13:40:15
|
|
Copyright info updated.
|
|
94d9ddb2
|
2016-04-06T13:39:09
|
|
4096 bytes line limit removed when STDIN is not a tty.
|
|
027dbcef
|
2015-07-13T16:04:24
|
|
Reported to work with Emacs comint mode.
|
|
80fd0569
|
2015-04-13T09:38:43
|
|
Version 1.0
Linenoise is used in multiple projects for enough time, let's tag this
commit with a version number as requested into issue #88, so that we
have an initial reference.
Given the nature of the library, the version was also added in the
linenoise C and header file as well so that it is easy to realize for
people having a copy embedded somewhere if they are using the latest
version.
|
|
cf1bdf5f
|
2014-10-07T15:22:48
|
|
License file added.
However the files linenose.c and linenose.h already had inline licenses.
|
|
c1c5a026
|
2014-09-03T11:49:43
|
|
Move to end before return when in multi-line mode.
This makes sure that if we are editing in multi-line mode a line that
actually spawns across multiple lines, the next output performed by the
application using linenoise will not overwrite the edited line.
|
|
01e723a0
|
2014-09-03T11:38:19
|
|
Replace ESC 999D with CR.
OSX default Terminal app does not handle 999D well, the cursor will wrap
back to the previous row in the last colum, instead of ignoring the
sequence if the cursor is already at the left edge.
In order to avoid reintroducing the nG sequence that is not compatible
with base VT100 emulation and ANSI.SYS, we use CR that should be
hopefully widely supported.
|
|
c84d0a02
|
2014-09-03T10:11:31
|
|
Don't emit ESC [ n C with n=0.
This fixes a bug introduced with ANSI.SYS compatibility.
When we want to move at a specific column, we need to emit the sequence
to move the cursor to the right (after we moved 999 positions to the left)
only if we want to actually move right at least 1 position, since a
count of zero will still move the cursor one position to the right.
|
|
471e7546
|
2014-09-03T09:51:29
|
|
Better specify the set of escapes used.
|
|
0a745fca
|
2014-09-03T09:30:32
|
|
Avoid CHA sequence for ANSI.SYS compatibility.
Github user @welash proposed a change in issue #73 in order to improve
the linenoise compatibility with older terminal emulators only able to
deal with a subset of ANSI sequences, notably ANSI.SYS and VT100
terminals strictly able to handle the original set of VT100 escape
sequences.
In order to improve the compatibility, the CHA sequence was removed and
translated to move 999 positions to the left, then move on the right
for the desired number of positions. The CHA sequence was apparently
added only with VT220, that's why it is not available everywhere.
This commit features almost exactly the change proposed in issue #73
with a small fix for a bug in multi-line editing mode introduced by the
patch.
|
|
828b9dac
|
2014-09-03T00:02:09
|
|
Remove trailing spaces from source code.
|
|
e0f15a65
|
2014-04-18T17:47:49
|
|
Multi line editing is no longer experimental.
It is now the default in the Redis command line interface so it is
used by many users every day.
|
|
0ca0326a
|
2014-04-18T17:46:47
|
|
Fixed yet another 1000 lines claim.
|
|
542ad7e3
|
2014-04-18T17:45:40
|
|
Linenoise is now ~ 1100 lines of code ;-)
Fixes issue #63.
|
|
c86280ed
|
2014-03-13T12:40:02
|
|
linenoiseHistoryAdd() reworked + duplicated lines prevented.
|
|
2a92a4d1
|
2014-03-13T12:27:53
|
|
Check read() return value in getCursorPosition().
|
|
ca20f8c4
|
2014-03-13T12:25:14
|
|
Support for Home / End keys.
Some terminal reports ESC [H and ESC [F, while some other reports
ESC OH and ESC OF. We support both but there is at least another
variant documented, hopefully no longer.
|
|
8447b2b0
|
2014-03-13T12:20:11
|
|
Fix right arrow handling.
Bug introduced in recent refactoring.
|
|
9e1c2318
|
2014-03-13T12:04:36
|
|
If ioctl() fails get num of columns querying the terminal.
This change makes linenoise both more robust if the ioctl() fails, and
far more portable to non POSIX systems, since the ioclt() to query the
terminal was probably one of the non trivial parts to replace.
The code is inspired to Andreas Kupries commit 24186e99 on the win32
Linenoise port from Steve Bennett, but is a complete reimplementation.
|
|
fb015dab
|
2014-03-13T11:08:37
|
|
linenoiseEdit() escapes processing refactor.
|
|
4115b616
|
2014-03-13T10:30:31
|
|
Compare human readable key codes with chars literals.
Many sequences are actually human readable and fall into the printable
ASCII subset, they are a lot more recognizable when written as chars
compared to numbers.
For example up arrow is sent back from the terimal as ESC [A, and so
forth.
This commit makes the code speak the same "language" that you find in
any terminal escape sequences documentation.
|
|
3e521d47
|
2014-03-13T10:19:07
|
|
linenoisePrintKeyCodes(): show character if printable.
|
|
f698ec47
|
2014-03-13T10:08:39
|
|
Rename Scan codes -> Key codes.
What we print in debug mode using the option (now) called --keycodes
are not the scan codes, but the key codes returned by the terminal (a
more higher level representation of the keys pressed).
This commit fixes the word used.
|
|
cb0d0400
|
2014-03-12T23:49:54
|
|
Fix Del key processing + minor cleanup.
|
|
bbcf9bf2
|
2014-03-12T23:38:40
|
|
Scan codes debugging functionality.
./linenoise_example --scancodes
|
|
a05ab23d
|
2014-03-12T23:25:27
|
|
Use the two-reads fix for the additional escapes as well.
See commit e153bd8 for more information.
The gist is that slow terminals may return a short read of 1 byte.
|
|
d5ec9cbb
|
2014-03-12T23:10:48
|
|
Arrow scancodes replaced with enums in linenoiseEdit().
|
|
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.
|
|
8d456682
|
2014-03-12T16:28:32
|
|
Merge branch 'master' of github.com:/antirez/linenoise
|
|
fb238590
|
2014-01-06T11:01:41
|
|
Add extern "C" around linenoise.h when compiled as C++
|
|
3cc30b1b
|
2014-03-12T16:23:24
|
|
Merge pull request #48 from nickg/emacs
Add "emacs" to unsupported_term
|
|
94cbdd65
|
2014-03-12T16:22:13
|
|
Merge pull request #49 from polch/master_fixes
fix linenoiseEdit buflen decreasing.
|
|
ff91a64c
|
2014-03-12T16:19:51
|
|
Merge pull request #51 from MartinNowak/const
use const char * when modification isn't necessary
|
|
01cd117f
|
2014-03-12T16:18:18
|
|
Don't assume STDIN_FD and STDOUT_FD are interchangeable.
|
|
49635f1c
|
2014-01-16T22:26:24
|
|
Add the key enumeration
|
|
8ea25f8d
|
2014-03-12T15:38:37
|
|
Debugging code cleanup.
|
|
f3a4e062
|
2014-03-12T13:12:29
|
|
Merge branch 'master' of git://github.com/antirez/linenoise
|
|
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.
|
|
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 ;-)
|
|
2022fb1f
|
2014-02-21T10:48:29
|
|
Merge pull request #53 from insop/master
fix incorrect type caused issue on 64bit powerpc
|
|
5f5cc2ea
|
2014-02-21T01:21:13
|
|
fix incorrect type caused issue on 64bit powerpc
Signed-off-by: Insop Song <insop.song@gainspeed.com>
|
|
9031c808
|
2014-01-28T00:53:26
|
|
use const char * when modification isn't necessary
|
|
3258af5a
|
2014-01-15T22:52:18
|
|
fix linenoiseEdit buflen decreasing.
|
|
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.
|
|
27a3b4d5
|
2013-02-08T03:33:05
|
|
Merge pull request #31 from fperrad/buildroot
fix getColumns() for Buildroot
|
|
59a4fc96
|
2013-02-08T12:24:07
|
|
Example app improved.
|
|
64e109e2
|
2013-02-08T12:18:42
|
|
linenoiseHistorySetMaxLen() was broken and never tested. Fixed.
|
|
5654f543
|
2013-02-08T00:12:39
|
|
Merge branch 'master' of git://github.com/antirez/linenoise
|
|
892ec0fe
|
2013-02-08T00:12:01
|
|
Completion fixed (broken during refactoring).
|
|
dac42999
|
2013-02-07T15:05:56
|
|
Merge pull request #30 from shvechikov/patch-1
Typo: readl -> real
|
|
4cc1ac49
|
2013-02-07T17:31:25
|
|
Merge branch 'master' of git://github.com/antirez/linenoise
|
|
09ddc709
|
2013-02-07T17:30:49
|
|
Fix to multi-line mode when deleting cross-line with cursor at EOL.
|
|
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
|
|
d7f2c5c5
|
2013-02-07T08:17:39
|
|
Reducing the lines of code from 1 million to 1 thousand
|
|
752175d6
|
2013-02-07T17:02:48
|
|
Linenoise is now ~1000 lines of code, not 400.
|
|
40a361d1
|
2013-02-07T16:59:43
|
|
README updated.
|
|
04eb8546
|
2013-02-07T16:57:09
|
|
Better option parsing for the example program.
|
|
16d398e6
|
2013-02-07T16:06:16
|
|
Experimental multi-line editing capabilities.
|
|
381bdee2
|
2013-02-06T12:49:06
|
|
Update year in copyright notice.
|
|
0f3b8134
|
2013-02-06T12:41:15
|
|
Escapes dispatching better documented.
|
|
21447864
|
2013-02-06T12:38:36
|
|
Ctrl-w refactored into linenoiseEditDeletePrevWord().
|
|
57b3f761
|
2013-02-06T12:32:42
|
|
Clarified with ctrl-t does in comments.
|
|
4d166e4f
|
2013-02-06T12:28:29
|
|
Backspace functionality refactored into linenoiseEditBackspace() function.
|
|
9e15fd42
|
2013-02-06T12:20:01
|
|
Delete and ctrl-d refactored into linenoiseEditDelete()
|
|
62a30cac
|
2013-02-06T12:08:19
|
|
Off-by-one overflow fixed. Was a silent bug before refactoring.
|