them there.
readline.h of libedit had to move to subdirectory 'readline', due to the way
BSD makefiles work; this is better than potentially fragile Makefile hacks
* pad entries shorter than 'max' by spaces correctly
* fix off-by-one error which caused extra newline to be printed
if the list fit exactly to a screen
* fix typo in _rl_qsort_string_compare, which caused the list to not
be sorted after all
implement displaying of possible completions, add hook to display the list
on second rl_complete() invocation in row (typically, double <TAB>)
This addresses the completion part of lib/11581 by Richard Earnshaw.
hardcoded value of 4.
A_K_NKEYS is currently 6 and this mismatch was stomping memory when
initializing the keys. (specifically gdb lost the exec file name if it was
a long path name).
properly together. xxgdb communicates with a gdb running on a pty
that it sets to -echo,-onlcr prior to forking the gdb process.
GNU readline preserves the -echo setting while libedit was undoing it
(setting the tty to a sane state and totally confusing xxgdb's parser).
this diff simply disables libedit if both readline emulation and
"stty -echo" are used/set. that is enough to make xxgdb work once
again, but (XXX) this is not how GNU readline handles stty -echo (it
does not echo anything, but editing commands like ^A,^K, etc.
still work), so the readline emulation isn't perfect.
change reviewed by christos.
bindings and their descriptions
* manually add the output of 'sh ./makelist -m vi.c ed.c common.c' to
a new section in editrc(5) called `EDITOR COMMANDS'
history_tokenize(): avoid stepping too far if backslash is last character
on the passed string
update some comments
This makes gdb \ escaping work reliably and fixes lib/9511 by Assar Westerlund.
I wrote for tcsh(1) three years ago.
- implement EL_RPROMPT, which allows a setting/getting of a function which
returns a string to be used as the right-side prompt.
- improve HISTORY and AUTHORS sections in editline(3).
- bump shlib minor version for EL_RPROMPT.
XXX: due to an implementation issue, the rprompt has a 1 space gap before the
edge of the logical screen. editline's logical screen is 1 space less
than the full screen width, so there's a 2 space gap between the rprompt
and the right end of the physical screen. i'm not concerned about this.
re_refresh(): cast the character passed to re_addc() to unsigned char,
so we don't end up calling isprint() with negative value
when chars are signed and character value is >= 128
- don't reopen fp if it was successfully opened in a previous check
- use strlcpy()/strlcat() instead of snprintf() to build a pathname,
since the former are more portable to other systems than the latter
* whitespace fascism
plus a few bogons noted along the way:
1) Set EDIT_DISABLED if terminal type is emacs.
2) fix bug in NO_TTY mode which caused it to not notice CR or LF
3) implement EDIT_DISABLED within libedit to be somewhat like NO_TTY,
except that a prompt is printed first.
* implement el_get(EditLine *, int op, void *result), which does the
inverse of el_set()
* add EL_EDITMODE operation to el_set and el_get; if non zero editing
is enabled (the default).
* add "edit on | off" editrc command, which modifies EL_EDITMODE.
users can now add '*:edit off' in ~/.editrc as an advisory to
disable editing.
NOTE: at this time EL_EDITMODE is just an indication of the
state of the 'edit' command. It's up to the application to check
this after el_source() or el_parse() to determine if editing is still
required.
of the user's namespace. We need to do this because the readline
emulation functions call term_beep(), but readline isn't built using
the same (funky) namespace-protection method as the rest of libedit (it's
included like a normal library object).
Without this (fairly disgusting) hack, any program linked against
libedit will fail to link with an unresolved reference to term_beep()
if using an Elf toolchain (e.g. on the Alpha).
XXX Why this doesn't happen with NetBSD's a.out toolchain is a mystery
XXX to me, and I'm not sure I really want to know (given that a.out
XXX _should_ break the same way as Elf does in this case).