Commit Graph

270 Commits

Author SHA1 Message Date
Joachim Nilsson
d4bef671b6 Minor, update .gitignore files
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-16 10:10:03 +02:00
Joachim Nilsson
054891f032 Add .deb package to official release target
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-16 10:10:03 +02:00
Joachim Nilsson
6fb3365893 docs/HACKING.md: Add release checklist and maintenance doc
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-16 09:35:27 +02:00
Joachim Nilsson
14b6dd37d6 Fix off-by-one in forward kill word
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-16 09:29:48 +02:00
Joachim Nilsson
89d2fefbc6 Skip leading whitespace when skipping or killing forwards
When the point is on whitespace between two words skipping forward, or
killing forward, should result in the new point being moved to the next
word:

     foo    bar fox gnu
         ^
=>
     foo    bar fox gnu
                ^

Before this patch the point moved to 'b'.  After this patch the point
moves to the first letter of the next word, 'f'.  Kill forward word now
properly kills 'bar' and moves to the first whitespace letter after
'bar'.  Both are now behaving like FSF Readline.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-16 09:29:48 +02:00
Joachim Nilsson
ac522cd749 Fix potential memory leak, found by Coverity Scan
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-16 08:29:01 +02:00
Joachim Nilsson
9a16999f0e Remove GNU Readline rl_complete() prototype, for now
We should add a configure option --enable-readline-compat, or sth, so
rl_complete2() (removed in this commit) becomes the new rl_complete(),
and the current rl_complete() becomes el_complete().

The current implementation of rl_complete2() was is incomplete and also
not working properly.  To eliminate any confusion on the matter this
patch removes it.  To restore functionality we should, at the very
least, merge with complete() and possibly also refactor rl_find_token()
to share code with the legacy el_find_word().

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-13 19:06:05 +02:00
Joachim Nilsson
e962b9582a Update ChangeLog, mention new fileman.c from GNU Readline
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-12 17:12:40 +02:00
Joachim Nilsson
29b24dcf83 Clarify comment about future --enable-readline-compat interface
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-12 17:12:19 +02:00
Joachim Nilsson
097fde5267 Merge branch 'master' of github.com:troglobit/editline 2018-09-11 19:57:25 +02:00
Joachim Nilsson
05ed94047b Update ChangeLog and fix description of bug #7 in earlier entry
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-11 19:56:05 +02:00
Joachim Nilsson
77d531f5b5 Refactor completion handling and add FSF Readline callbacks
Still a bit raw, but the basic building blocks are there, waiting to be
cleaned up and released.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-11 19:55:43 +02:00
Joachim Nilsson
405f091888
Merge pull request #19 from jmjatlanta/jmj_sigsev
Fix sementation violation when displaying options
2018-07-12 10:50:04 +02:00
jmjatlanta
d2418161ad Fix sementation violation when displaying options 2018-07-11 18:01:48 -05:00
Joachim Nilsson
b2f1cfbbcc fileman: New example, from libedit, and from GNU Readline originally
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-06-17 21:13:02 +02:00
Joachim Nilsson
76039b458b Fix #17: Fix off-by-one problem with strdup() replacement
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-06-14 21:59:18 +02:00
Joachim Nilsson
a5aaf51530 Minor, update project description
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-06-11 22:32:36 +02:00
Joachim Nilsson
bd5ae42b4b Remove configure option --disable-default-complete
The filename completion handler fallback will now be enabled by default.
To disable it a new GNU Readline function pointer will be added.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-04-02 22:08:43 +02:00
Joachim Nilsson
41bbb304b1 Export internal el_next_hist() and el_prev_hist()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-04-01 16:10:10 +02:00
Joachim Nilsson
f40a2a6a2c TODO: custom completion handlers verified in examples/cli.c
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-03-31 14:42:10 +02:00
Joachim Nilsson
534b3897b8 Minor update
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-03-31 01:23:41 +02:00
Joachim Nilsson
b4cf343342 Unify on docs/ directory, which is de facto standard on GitHub
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-03-31 01:21:12 +02:00
Joachim Nilsson
4c55280864 Update ChangeLog for upcoming v1.16.0 release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-03-29 21:17:20 +02:00
Joachim Nilsson
78eabbde39 man: Minor update
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-03-24 19:35:16 +01:00
Joachim Nilsson
bc510b320e Follow-up #15: Clean up TODO, event loop callback now supported
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-03-24 19:34:19 +01:00
Joachim Nilsson
3cf0e89a68 Merge branch 'dev' 2018-03-22 16:06:19 +01:00
Joachim Nilsson
5b43c028c9 Revert "Travis-CI: Disable CLANG temporarily for Coverity Scan"
This reverts commit 6a7483532c.
2018-03-22 16:06:04 +01:00
Joachim Nilsson
1657da4f2e README: Minor whitespace changes
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-03-22 13:16:07 +01:00
Joachim Nilsson
fdda4f5cae README: Add license badge and add Wikipedia link to C News
The C News sources are referenced in the Wikipedia article, which is
useful to follow-up the license origins.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-03-22 10:49:49 +01:00
Joachim Nilsson
f8c6b7f208 Update .gitignore
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-03-22 10:49:39 +01:00
Joachim Nilsson
9e9f8b03d8 Fix Coverity Scan findings, missing return and bad strcpy()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-03-22 10:31:50 +01:00
Joachim Nilsson
0bfaf351aa Add support for Ctrl+Right and Ctrl+Left, forward/back word
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-03-22 08:42:32 +01:00
Joachim Nilsson
2ce0be942e Minor, reorder functions
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-03-22 08:38:04 +01:00
Joachim Nilsson
6a7483532c Travis-CI: Disable CLANG temporarily for Coverity Scan
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-03-22 08:17:03 +01:00
Joachim Nilsson
ad3b1c8a07 ChangeLog: Fix missing Markdown link to v1.15.3
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-03-09 20:29:52 +01:00
Joachim Nilsson
5be965deec Simplify and clarify example
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-12-27 14:01:54 +01:00
Joachim Nilsson
791508a3a1 Minor fix, whitespace
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-12-27 13:27:59 +01:00
Joachim Nilsson
6de69a406b Update example with build instructions, put it before API listing
This update should help with issues like that described in #16, "how do
I use this library?"

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-12-27 13:15:52 +01:00
Joachim Nilsson
197f3e1c32 Minor fixes, grammar + whitespace
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-12-27 13:15:02 +01:00
Joachim Nilsson
6adf0e98bb README: Add alternate interface docu
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-12-11 08:55:12 +01:00
Joachim Nilsson
bc7fc7e5c0 Fix #15: Alternate interface to plain readline(), for event loops
This rather big patch adds support for the GNU Readline alternate
interface, for use with event loops:

    void rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *lhandler);
    void rl_callback_read_char       (void);
    void rl_callback_handler_remove  (void);

The code has been tested using the testit and excallback examples.
Both regular editing and searching works as intended.

Also, the problem with lingering artefacts on screen when scrolling
through the history has been fixed.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-12-11 08:43:43 +01:00
Joachim Nilsson
935895bbf1 testit: Don't add history, readline() already does this
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-12-11 08:43:03 +01:00
Joachim Nilsson
2ec55cc9f1 Minor, simplify
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-12-11 08:42:33 +01:00
Joachim Nilsson
7f7bb5b45c Minor, use NULL not 0, and -1 not NULL
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-12-11 01:45:25 +01:00
Joachim Nilsson
9b7b3121c5 configure: Check for unistd.h
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-12-02 21:15:17 +01:00
Joachim Nilsson
53b160f6a1 examples: Define EDITLINE_LIBRARY when building locally
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-12-02 21:14:49 +01:00
Joachim Nilsson
779db8817e rl_refresh_line(): new (undocumented) readline compat fn
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-12-02 21:14:14 +01:00
Joachim Nilsson
29a71a53d0 rl_insert_text(): new readline compat fn
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-12-02 21:13:39 +01:00
Joachim Nilsson
a9824655ee excallback.c: Fix compilation errors against readline
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-12-02 18:54:29 +01:00
Joachim Nilsson
69d9e549a0 examples/excallback.c: Jeff Solomon's alternate interface example
This patch adds the unmodified excallback.c from readline.  It was
originally contributed by Jeff Solomon as an example of the alternate
interface to readline.

The following set of patches modify it to work with editline.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2017-12-02 18:46:48 +01:00