1. Simplify code in reposition()
2. Add tty_push() for commonly used operation, reduce code duplication.
3. Fix left() so that it treats 8-bit chars as one when not in meta-mode.
4. Replace isalnum() with homegrown implementation that understands 8-bit
and control chars.
5. Fix ceol() before introducing ANSI "kill-to-end-of-line" escape code.
This actually seems to work, previously I erronesouly used an UTF-8
terminal for testing. Which of course broke the test on an ISO-8859-1
[only] terminal.
This changeset fixes an old Debian patch that attempted to fix the display
of 8-bit characters in the function emacs(). It accidentally crippled the
function of M-d and M-DEL. The latter was however also broken by being
mapped to wipe(), more on that below.
The real fix is to set rl_meta_chars to 0 by default and in the tty_show()
function, which tried to be smart and output control and meta characters
(in the wrong order as well). Simply disabling the special code for output
of control characters fixes 8-bit input.
We also nuke the old and broken wipe() function that was mapped to M-DEL,
instead we map that key binding to bk_kill_word(), which works.
Instead merge afd8b4de9dca8ec6afc3 from http://github.com/heimdal/heimdal.git project.
This lets rl_complete() and rl_list_possib() become wrapper functions calling a set of
function pointers, set using rl_set_complete_func() and rl_set_list_possib_funct().
Each wrapper has a fallback to do filename completion, which in turn can be disabled
by leaving out --enable-default-complete from the configure line.
This change, admittedly quite intrusive for a library, is a better implementation in
many ways. For one it is much more readable, but it also enables further adoption of
other editline forks as well as a simpler implementation of GNU Readline function
pointers rl_completion_entry_function and rl_attempted_completion_function at a later
stage.
My apologies to everyone for whom this change breaks backwards compatibility. For
help on converting your code, please see examples/cli.c.
The ordering of alternative rl_ttyset() implementations is important.
We have chosen to place the most common, most portable, code first
and then in lesser order. Ending with the sgtty.h based code, which
I cannot test on GNU/Linux. Will test on OpenBSD later.
Also added Emacs indentation style to make it easier to follow the
original style of Mr Turner and Salz.
Remove all old $Id:$ and similar constructs, they don't provide any
additional benefit anymore.
Add configure options for toggling terminal bell and toying with
SIGSTOP using Ctrl-Z. Rename config option for ANSI keys to get
a consistent namespace.
Also did some work on ANSI-fication of function definitions, lot's
of that was still lingering around.